summaryrefslogtreecommitdiffstats
path: root/todolists/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'todolists/models.py')
-rw-r--r--todolists/models.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/todolists/models.py b/todolists/models.py
index 76af0d3..e02cdd1 100644
--- a/todolists/models.py
+++ b/todolists/models.py
@@ -66,12 +66,15 @@ class TodolistPackage(models.Model):
arch = models.ForeignKey(Arch)
repo = models.ForeignKey(Repo)
created = models.DateTimeField()
- status = models.SmallIntegerField(default=0, choices=STATUS_CHOICES)
+ removed = models.DateTimeField(null=True, blank=True)
+ status = models.SmallIntegerField(default=INCOMPLETE,
+ choices=STATUS_CHOICES)
user = models.ForeignKey(User, null=True, on_delete=models.SET_NULL)
comments = models.TextField(null=True, blank=True)
class Meta:
unique_together = (('todolist','pkgname', 'arch'),)
+ get_latest_by = 'created'
def __unicode__(self):
return self.pkgname