--- a/pytask/taskapp/models.py Sat Jan 08 20:55:34 2011 +0530
+++ b/pytask/taskapp/models.py Sat Jan 08 20:58:17 2011 +0530
@@ -42,11 +42,26 @@
task = models.ForeignKey('Task', related_name = "%(class)s_task")
data = models.TextField()
- created_by = models.ForeignKey(User, related_name = "%(class)s_created_by")
+ commented_by = models.ForeignKey(User, related_name = "%(class)s_created_by")
deleted_by = models.ForeignKey(User, null = True, blank = True,
related_name = "%(class)s_deleted_by")
- creation_datetime = models.DateTimeField()
+ comment_datetime = models.DateTimeField()
is_deleted = models.BooleanField(default=False)
def __unicode__(self):
return unicode(self.task.title)
+
+class TaskClaim(models.Model):
+
+ uniq_key = models.CharField(max_length = 10, unique = True)
+ task = models.ForeignKey('Task', related_name = "%(class)s_task")
+
+ claimed_by = models.ForeignKey(User, related_name = "%(class)s_created_by")
+ proposal = models.TextField()
+
+ comment_datetime = models.DateTimeField()
+ is_deleted = models.BooleanField(default=False)
+
+ def __unicode__(self):
+ return unicode(self.task.title)
+