made changes to models.
authoranoop
Tue, 23 Feb 2010 17:55:04 +0530
changeset 59 f6a3bf088a9e
parent 58 e0ec1901dfce
child 60 3eac96608091
made changes to models.
taskapp/models.py
--- a/taskapp/models.py	Tue Feb 23 15:27:00 2010 +0530
+++ b/taskapp/models.py	Tue Feb 23 17:55:04 2010 +0530
@@ -25,7 +25,7 @@
 UPLOADS_DIR = "./uploads"
 
 class Profile(models.Model):
-	
+    
     user = models.ForeignKey(User, unique = True)
     dob = models.DateField(verbose_name = u"Date of Birth", help_text = "YYYY-MM-DD")
     gender = models.CharField(max_length = 1, choices = GENDER_CHOICES)
@@ -41,7 +41,7 @@
     city = models.CharField(max_length = 25, blank = True)
     country = models.CharField(max_length = 25, blank = True)
     nick = models.CharField(max_length = 20, blank = True)
-#    photo = models.ImageField(upload_to = IMAGES_DIR, blank = True)
+    photo = models.ImageField(upload_to = IMAGES_DIR, blank = True)
 
     def __unicode__(self):
         return unicode(self.user.username)
@@ -83,9 +83,9 @@
     data = models.TextField()
     created_by = models.ForeignKey(User, related_name = "%(class)s_created_by")
     creation_datetime = models.DateTimeField()
-#    deleted_by = models.ForeignKey(User, null = True, blank = True, related_name = "%(class)s_deleted_by")
-#    deleted = models.BooleanField()
-#    attachment = models.FileField(upload_to = UPLOADS_DIR, blank = True)
+    deleted_by = models.ForeignKey(User, null = True, blank = True, related_name = "%(class)s_deleted_by")
+    deleted = models.BooleanField()
+    attachment = models.FileField(upload_to = UPLOADS_DIR, blank = True)
     
     def __unicode__(self):
         return unicode(self.task.title)
@@ -119,6 +119,7 @@
     creation_date = models.DateTimeField()
     reply_date = models.DateTimeField()
     replied = models.BooleanField(default = False)
+    task = models.ForeignKey(Task,related_name = "%(class)s_task", blank = True, null = True)
 
 class Notification(models.Model):