summaryrefslogtreecommitdiff
path: root/taskapp/models.py
diff options
context:
space:
mode:
authornishanth2010-02-25 03:47:23 +0530
committernishanth2010-02-25 03:47:23 +0530
commit1ad94f0330dc47801a129299122ea8d97d4b1623 (patch)
tree9016407db082f5db061648ae00294872d3f2469e /taskapp/models.py
parenta4dc314c81b55b37e0d7cb251890cef53d95cc80 (diff)
downloadpytask-1ad94f0330dc47801a129299122ea8d97d4b1623.tar.gz
pytask-1ad94f0330dc47801a129299122ea8d97d4b1623.tar.bz2
pytask-1ad94f0330dc47801a129299122ea8d97d4b1623.zip
our task model does not meet out needs. so modified it and added a model called map. made the changes in views accordingly.phew!!!. this one took the hell out of me :( .
Diffstat (limited to 'taskapp/models.py')
-rw-r--r--taskapp/models.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/taskapp/models.py b/taskapp/models.py
index a4de208..cb72070 100644
--- a/taskapp/models.py
+++ b/taskapp/models.py
@@ -75,9 +75,6 @@ class Task(models.Model):
# tags = models.CharField(max_length = 200, blank = True)
tags_field = TagField()
- subs = models.ManyToManyField('self', blank = True, related_name = "%(class)s_parents")
- deps = models.ManyToManyField('self', blank = True, related_name = "%(class)s_deps")
-
credits = models.PositiveSmallIntegerField()
progress = models.PositiveSmallIntegerField(default = 0)
@@ -87,7 +84,7 @@ class Task(models.Model):
assigned_users = models.ManyToManyField(User, blank = True, related_name = "%(class)s_assigned_users")
creation_datetime = models.DateTimeField()
-
+ sub_type = models.CharField(max_length=1, choices = (('D','Dependency'),('S','Subtask')), default = 'D')
#is_claimable = models.BooleanField()
## not yet decided if attribs after this are to be included
@@ -97,6 +94,12 @@ class Task(models.Model):
def __unicode__(self):
return unicode(self.title)
+class Map(models.Model):
+
+ main = models.ForeignKey('Task', related_name = "%(class)s_main")
+ subs = models.ManyToManyField('Task', blank = True, null = True, related_name = "%(class)s_subs")
+
+
class Comment(models.Model):
task = models.ForeignKey('Task')