taskapp/models.py
changeset 33 0d0ea7b188d5
parent 22 36d3173ab7f9
child 38 7910ff503036
equal deleted inserted replaced
32:78adf44d895d 33:0d0ea7b188d5
    44         return unicode(self.user.username)
    44         return unicode(self.user.username)
    45 
    45 
    46 
    46 
    47 class Task(models.Model):
    47 class Task(models.Model):
    48     
    48     
    49     title = models.CharField(max_length = 200, unique = True)
    49     title = models.CharField(max_length = 100, unique = True)
    50     desc = models.TextField()
    50     desc = models.TextField()
    51     status = models.CharField(max_length = 2, choices = STATUS_CHOICES, default = "UP")
    51     status = models.CharField(max_length = 2, choices = STATUS_CHOICES, default = "UP")
    52     tags = models.CharField(max_length = 200, blank = True)
    52     tags = models.CharField(max_length = 200, blank = True)
    53     
    53     
    54     subs = models.ManyToManyField('self', blank = True, related_name = "%(class)s_parents")
    54     subs = models.ManyToManyField('self', blank = True, related_name = "%(class)s_parents")