45 |
46 |
46 class Task(models.Model): |
47 class Task(models.Model): |
47 |
48 |
48 title = models.CharField(max_length = 200, unique = True) |
49 title = models.CharField(max_length = 200, unique = True) |
49 desc = models.TextField() |
50 desc = models.TextField() |
50 status = models.CharField(max_length = 2, choices = STATUS_CHOICES) |
51 status = models.CharField(max_length = 2, choices = STATUS_CHOICES, default = "UP") |
51 tags = models.CharField(max_length = 200, blank = True) |
52 tags = models.CharField(max_length = 200, blank = True) |
52 |
53 |
53 subs = models.ManyToManyField('self', blank = True, related_name = "%(class)s_parents") |
54 subs = models.ManyToManyField('self', blank = True, related_name = "%(class)s_parents") |
54 deps = models.ManyToManyField('self', blank = True, related_name = "%(class)s_deps") |
55 deps = models.ManyToManyField('self', blank = True, related_name = "%(class)s_deps") |
55 |
56 |
56 credits = models.PositiveSmallIntegerField() |
57 credits = models.PositiveSmallIntegerField() |
57 progress = models.PositiveSmallIntegerField() |
58 progress = models.PositiveSmallIntegerField(default = 0) |
58 |
59 |
59 mentors = models.ManyToManyField(User, related_name = "%(class)s_mentors") |
60 mentors = models.ManyToManyField(User, related_name = "%(class)s_mentors") |
60 created_by = models.ForeignKey(User, related_name = "%(class)s_created_by") |
61 created_by = models.ForeignKey(User, related_name = "%(class)s_created_by") |
61 claimed_users = models.ManyToManyField(User, blank = True, related_name = "%(class)s_claimed_users") |
62 claimed_users = models.ManyToManyField(User, blank = True, related_name = "%(class)s_claimed_users") |
62 assigned_users = models.ManyToManyField(User, blank = True, related_name = "%(class)s_assigned_users") |
63 assigned_users = models.ManyToManyField(User, blank = True, related_name = "%(class)s_assigned_users") |