From 9b653583711c59d96c45af43ff8ee9534500adb6 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Thu, 25 Jul 2013 13:28:19 +0200 Subject: display "issues" with files in package view Currently this is invalid .gz files and png files not named .png. --- webapp.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'webapp.py') diff --git a/webapp.py b/webapp.py index b5e0c63..c442ebe 100755 --- a/webapp.py +++ b/webapp.py @@ -69,6 +69,14 @@ package_template = jinjaenv.from_string( {%- endfor -%}

Note: Packages with yellow background are required to be installed when this package is installed.

{%- endif -%} +{%- if issues -%} +

issues with particular files

+ + {%- for filename, issue in issues|dictsort(true) -%} + + {%- endfor -%} +
filenameissue
{{ filename|e }}{{ issue|e }}
+{%- endif -%} {% endblock %}""") detail_template = jinjaenv.from_string( @@ -271,6 +279,11 @@ class Application(object): params["dependencies"] = self.get_dependencies(params["pid"]) params["shared"] = self.cached_sharedstats(params["pid"]) params["urlroot"] = ".." + cur = self.db.cursor() + cur.execute("SELECT content.filename, issue.issue FROM content JOIN issue ON content.id = issue.cid WHERE content.pid = ?;", + (params["pid"],)) + params["issues"] = dict(cur.fetchall()) + cur.close() return html_response(package_template.render(params)) def compute_comparison(self, pid1, pid2): -- cgit v1.2.3