pytask/taskapp/models.py
changeset 11 d28fcc644fbb
parent 5 aea7e764c033
child 14 f2623fb8041a
--- a/pytask/taskapp/models.py	Fri Jan 29 23:34:19 2010 +0530
+++ b/pytask/taskapp/models.py	Sat Jan 30 13:03:09 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")