diff options
Diffstat (limited to 'main/models.py')
-rw-r--r-- | main/models.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/main/models.py b/main/models.py index 24befddd..4370fa24 100644 --- a/main/models.py +++ b/main/models.py @@ -84,6 +84,8 @@ class Repo(models.Model): name = models.CharField(max_length=255, unique=True) testing = models.BooleanField(default=False, help_text="Is this repo meant for package testing?") + staging = models.BooleanField(default=False, + help_text="Is this repo meant for package staging?") bugs_project = models.SmallIntegerField(default=1, help_text="Flyspray project ID for this repository.") svn_root = models.CharField(max_length=64, @@ -191,7 +193,7 @@ class Package(models.Model): # find another package by this name in the opposite testing setup if not Package.objects.filter(pkgname=self.pkgname, - arch=self.arch).exclude(id=self.id, + arch=self.arch).exclude(id=self.id).exclude( repo__testing=self.repo.testing).exists(): # there isn't one? short circuit, all required by entries are fine return requiredby @@ -349,8 +351,9 @@ class Todolist(models.Model): creator = models.ForeignKey(User) name = models.CharField(max_length=255) description = models.TextField() - date_added = models.DateTimeField(auto_now_add=True) + date_added = models.DateTimeField(auto_now_add=True, db_index=True) objects = TodolistManager() + def __unicode__(self): return self.name |