summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/models.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/main/models.py b/main/models.py
index 336f0ecf..8d5da3bc 100644
--- a/main/models.py
+++ b/main/models.py
@@ -260,6 +260,15 @@ class Package(models.Model):
root = 'packages'
return linkbase % (root, dirname, repo, self.arch.name)
+ def get_bugs_link(self):
+ repo = self.repo.name.lower()
+ if repo.startswith('community'):
+ project = 5
+ else:
+ project = 1
+ return "http://bugs.archlinux.org/?project=%d&string=%s" % \
+ (project, self.pkgname)
+
class Signoff(models.Model):
pkg = models.ForeignKey(Package)