summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-01-31 15:43:37 -0600
committerDan McGee <dan@archlinux.org>2010-01-31 15:43:37 -0600
commitd721c724addb811ed4734fc391303950a484167e (patch)
tree56b31c9e7d8819da23e729a15da61896ec92eb6d /main
parentcc93d3eda6a929ce02a608a113b2eb5f74547323 (diff)
downloadarchweb-d721c724addb811ed4734fc391303950a484167e.tar.gz
archweb-d721c724addb811ed4734fc391303950a484167e.zip
Make bugs link more useful
Link directly to the right project in Flyspray instead of whatever the user looked at last. Fixes FS#13166. Signed-off-by: Dan McGee <dan@archlinux.org>
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)