diff options
-rw-r--r-- | main/models.py | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/main/models.py b/main/models.py index 9f382cb0..663ea11e 100644 --- a/main/models.py +++ b/main/models.py @@ -41,15 +41,9 @@ class UserProfile(models.Model): ####################### class TodolistManager(models.Manager): def get_incomplete(self): - results = [] - for l in self.all().order_by('-date_added'): - if TodolistPkg.objects.filter(list=l.id).filter( - complete=False).count() > 0: - results.append(l) - return results + return self.filter(todolistpkg__complete=False).distinct() class PackageManager(models.Manager): - def flagged(self): return self.get_query_set().filter(needupdate=True) @@ -271,19 +265,5 @@ class TodolistPkg(models.Model): db_table = 'todolist_pkgs' unique_together = (('list','pkg'),) -class Wikipage(models.Model): - """Wiki page storage""" - title = models.CharField(max_length=255) - content = models.TextField() - last_author = models.ForeignKey(User, related_name='wikipage_last_author') - class Meta: - db_table = 'wikipages' - - def editurl(self): - return "/wiki/edit/" + self.title + "/" - - def __str__(self): - return self.title - # vim: set ts=4 sw=4 et: |