diff options
author | 2010-07-15 22:39:35 +0300 | |
---|---|---|
committer | 2010-07-15 22:39:35 +0300 | |
commit | b4b56383f5828fea9ef1298c28b930d5c28caa66 (patch) | |
tree | 65023d8fb553e10878169dcbd52fa101046a92ee | |
parent | Added db schema initialization script (diff) | |
download | gsoc2010-grumpy-b4b56383f5828fea9ef1298c28b930d5c28caa66.tar.gz gsoc2010-grumpy-b4b56383f5828fea9ef1298c28b930d5c28caa66.tar.bz2 gsoc2010-grumpy-b4b56383f5828fea9ef1298c28b930d5c28caa66.zip |
Added Pkg-related QA issues to template
-rw-r--r-- | grumpy/templates/browse_pkg.html | 13 | ||||
-rw-r--r-- | grumpy/webapp.py | 3 |
2 files changed, 14 insertions, 2 deletions
diff --git a/grumpy/templates/browse_pkg.html b/grumpy/templates/browse_pkg.html index dd81a07..cb6bcc7 100644 --- a/grumpy/templates/browse_pkg.html +++ b/grumpy/templates/browse_pkg.html @@ -7,5 +7,16 @@ {% for ebuild in pkg.ebuilds %} <li>{{ ebuild.version | e }}</li> {% endfor %} -<ul> +</ul> +{% if qa %} + <h3>Package QA issues</h3> + <dl> + {% for pkgqa in qa %} + <dt>{{ pkgqa.type | e }}</dt> + <dd>{{ pkgqa.data | e }}</dd> + {% endfor %} + </dl> +{% else %} +<span>This package has no known QA issues</span> +{% endif %} {% endblock %} diff --git a/grumpy/webapp.py b/grumpy/webapp.py index fa7381a..b33156b 100644 --- a/grumpy/webapp.py +++ b/grumpy/webapp.py @@ -37,7 +37,8 @@ def browse_pkg(cat, pkg): package = Package.query.filter_by(cat=cat) \ .filter_by(pkg=pkg).first() if package: - return render_template('browse_pkg.html', cat=cat, pkg=package) + return render_template('browse_pkg.html', cat=cat, pkg=package, \ + qa=package.qaissues) flash('Package "%s/%s" does not exist' % (cat, pkg)) return redirect(url_for('browse_cat', cat=cat)) |