summaryrefslogtreecommitdiff
path: root/main/models.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-01-31 14:58:28 -0600
committerDan McGee <dan@archlinux.org>2010-01-31 14:58:28 -0600
commite0eed01914752ee98d50aeab748f71b24df94dc6 (patch)
treed1fb8184d362334ea2bb931e3788b91319d4e211 /main/models.py
parent343786f8cdbf9577e4b6f1ca42b94d4296631675 (diff)
Add a pkgname index
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'main/models.py')
-rw-r--r--main/models.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/main/models.py b/main/models.py
index d0c9c5c4..80033546 100644
--- a/main/models.py
+++ b/main/models.py
@@ -164,7 +164,7 @@ class Package(models.Model):
arch = models.ForeignKey(Arch, related_name="packages")
maintainer = models.ForeignKey(User, related_name="maintained_packages", null=True, blank=True)
needupdate = models.BooleanField(default=False)
- pkgname = models.CharField(max_length=255)
+ pkgname = models.CharField(max_length=255, db_index=True)
pkgbase = models.CharField(max_length=255, null=True, blank=True)
pkgver = models.CharField(max_length=255)
pkgrel = models.CharField(max_length=255)
@@ -210,7 +210,6 @@ class Package(models.Model):
def approved_for_signoff(self):
return self.signoffs.count() >= 2
-
def get_requiredby(self):
"""
Returns a list of package objects.