summaryrefslogtreecommitdiff
path: root/webapp.py
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2013-07-25 13:28:19 +0200
committerHelmut Grohne <helmut@subdivi.de>2013-07-25 13:28:19 +0200
commit9b653583711c59d96c45af43ff8ee9534500adb6 (patch)
treeaca58a607a571f1f46294e2cfa4f20ce06746771 /webapp.py
parent796eeb217e449234b777512451c5b668837c9118 (diff)
downloaddebian-dedup-9b653583711c59d96c45af43ff8ee9534500adb6.tar.gz
display "issues" with files in package view
Currently this is invalid .gz files and png files not named .png.
Diffstat (limited to 'webapp.py')
-rwxr-xr-xwebapp.py13
1 files changed, 13 insertions, 0 deletions
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 -%}
<p>Note: Packages with yellow background are required to be installed when this package is installed.</p>
{%- endif -%}
+{%- if issues -%}
+ <h3>issues with particular files</h3>
+ <table border='1'><tr><th>filename</th><th>issue</th></tr>
+ {%- for filename, issue in issues|dictsort(true) -%}
+ <tr><td><span class="filename">{{ filename|e }}</span></td><td>{{ issue|e }}</td></tr>
+ {%- endfor -%}
+ </table>
+{%- 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):