taskapp/models.py
changeset 48 8670846be981
parent 38 7910ff503036
child 49 52b774df918e
--- a/taskapp/models.py	Mon Feb 22 17:35:19 2010 +0530
+++ b/taskapp/models.py	Mon Feb 22 17:52:51 2010 +0530
@@ -1,5 +1,8 @@
 from django.db import models
 from django.contrib.auth.models import User
+import tagging
+from tagging.fields import TagField
+
 
 GENDER_CHOICES = (( 'M', 'Male'), ('F', 'Female'))
 RIGHTS_CHOICES = (
@@ -31,7 +34,8 @@
     credits = models.PositiveSmallIntegerField(default = 0)
     
     aboutme = models.TextField(blank = True)
-    foss_comm = models.CharField(max_length = 80, blank = True, verbose_name = u"Foss Communities", help_text = u"Comma seperated list of foss communities you are involved in.")
+#    foss_comm = models.CharField(max_length = 80, blank = True, verbose_name = u"Foss Communities", help_text = u"Comma seperated list of foss communities you are involved in.")
+    foss_comm = TagField()
     phonenum = models.CharField(max_length = 15, blank = True, verbose_name = u"Phone Number")
     homepage = models.URLField(blank = True, verbose_name = u"Homepage/Blog")
     street = models.CharField(max_length = 80, blank = True)
@@ -49,7 +53,8 @@
     title = models.CharField(max_length = 100, unique = True, verbose_name = u"Title", help_text = u"Keep it simple and below 100 chars.")
     desc = models.TextField(verbose_name = u"Description")
     status = models.CharField(max_length = 2, choices = STATUS_CHOICES, default = "UP")
-    tags = models.CharField(max_length = 200, blank = True)
+#    tags = models.CharField(max_length = 200, blank = True)
+    tags = TagField()
     
     subs = models.ManyToManyField('self', blank = True, related_name = "%(class)s_parents")
     deps = models.ManyToManyField('self', blank = True, related_name = "%(class)s_deps")
@@ -104,3 +109,5 @@
     message = models.TextField()
     creation_datetime = models.DateTimeField()
     
+tagging.register(Profile)
+tagging.register(Task)