taskapp/models.py
changeset 18 a39549bd5b08
parent 12 a93eebabfeb1
child 21 c28774fe7ffd
--- a/taskapp/models.py	Thu Feb 04 22:21:44 2010 +0530
+++ b/taskapp/models.py	Thu Feb 04 22:27:47 2010 +0530
@@ -9,6 +9,7 @@
 	("CT", "Contributor"),)
 
 STATUS_CHOICES = (
+    ("UP", "Unpublished"),
 	("OP", "Open"),
     ("LO", "Locked"),
 	("CL", "Claimed"),
@@ -47,14 +48,14 @@
     
     title = models.CharField(max_length = 200, unique = True)
     desc = models.TextField()
-    status = models.CharField(max_length = 2, choices = STATUS_CHOICES)
+    status = models.CharField(max_length = 2, choices = STATUS_CHOICES, default = "UP")
     tags = models.CharField(max_length = 200, blank = True)
     
     subs = models.ManyToManyField('self', blank = True, related_name = "%(class)s_parents")
     deps = models.ManyToManyField('self', blank = True, related_name = "%(class)s_deps")
     
     credits = models.PositiveSmallIntegerField()
-    progress = models.PositiveSmallIntegerField()
+    progress = models.PositiveSmallIntegerField(default = 0)
         
     mentors = models.ManyToManyField(User, related_name = "%(class)s_mentors")
     created_by = models.ForeignKey(User, related_name = "%(class)s_created_by")