From dbe08a0ce324fb03ba6de2d02a947b2ac1834a54 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Thu, 11 Oct 2007 11:36:07 +0000 Subject: Add links in the licenses. --- web/model.py | 7 +++++++ web/templates/index.html | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/web/model.py b/web/model.py index a71b8e8..6634e25 100644 --- a/web/model.py +++ b/web/model.py @@ -180,6 +180,13 @@ class PackageDB(object): pkg['atom'] = atom pkg['meta'] = pkg_metadata pkg['keywords'] = self.get_package_keywords(cpvstr) + pkg['license'] = [] + for l in pkg_metadata['license'].split(): + if l[0].isalnum(): + l = '%s' % (l,l) + pkg['license'].append(l) + pkg['license'] = ' '.join(pkg['license']) + pkg['changelog'] = 'http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/%s/ChangeLog' % (atom.key) pkg['bugzilla'] = 'http://bugs.gentoo.org/buglist.cgi?query_format=&short_desc_type=allwords&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&short_desc=%s' % (atom.package) pkg['forums'] = 'http://forums.gentoo.org//search.php?search_terms=all&show_results=topics&mode=results&search_keywords=%s' % (atom.package) diff --git a/web/templates/index.html b/web/templates/index.html index b133b18..ff65395 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -1,4 +1,5 @@ + @@ -60,7 +61,7 @@ ${pkg.meta.commitmsg} ${pkg.meta.atom.category} - ${pkg.meta.license} + ${HTML(pkg.license)} -- cgit v1.2.3-65-gdbad