taskapp/models.py
changeset 123 a6b4234388c8
parent 119 39ab7c460143
child 124 6d92b7cd2a37
--- a/taskapp/models.py	Fri Feb 26 17:49:26 2010 +0530
+++ b/taskapp/models.py	Fri Feb 26 18:34:30 2010 +0530
@@ -155,12 +155,15 @@
 
 class Notification(models.Model):
 
-    to = models.ManyToManyField(User, related_name = "%(class)s_to", blank = False)
-    is_read = models.BooleanField(default = False)
-    sent_date = models.DateTimeField()
+    sent_to = models.ManyToManyField(User, related_name = "%(class)s_sent_to", blank = False)
+    sent_from = models.ManyToManyField(User, related_name = "%(class)s_sent_from", blank = True)
+
     sub = models.CharField(max_length = 100)
     message = models.TextField()
-    deleted = models.BooleanField(default = False)
+
+    sent_date = models.DateTimeField()
+    is_read = models.BooleanField(default = False)
+    is_deleted = models.BooleanField(default = False)
     
 tagging.register(Profile)
 tagging.register(Task)