summaryrefslogtreecommitdiff
path: root/main/models.py
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2011-05-12 15:52:08 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2011-05-12 15:52:08 -0300
commit57804e82978727001fc62e5b1106d69531a9cd97 (patch)
tree770756414046565af864487a0020f2ef7be8df0a /main/models.py
parent37075e5f3423a69fec03faf31ce2133c55374dfc (diff)
parentf6464da0e14047e9db803f4b40c18ba644e75f24 (diff)
Merge branch 'master' of git://projects.archlinux.org/archweb
Conflicts: templates/packages/packages_list.html templates/public/index.html
Diffstat (limited to 'main/models.py')
-rw-r--r--main/models.py7
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