From b4b56383f5828fea9ef1298c28b930d5c28caa66 Mon Sep 17 00:00:00 2001 From: Priit Laes Date: Thu, 15 Jul 2010 22:39:35 +0300 Subject: Added Pkg-related QA issues to template --- grumpy/templates/browse_pkg.html | 13 ++++++++++++- 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 %}
  • {{ ebuild.version | e }}
  • {% endfor %} - +{% if qa %} +

    Package QA issues

    +
    + {% for pkgqa in qa %} +
    {{ pkgqa.type | e }}
    +
    {{ pkgqa.data | e }}
    + {% endfor %} +
    +{% else %} +This package has no known QA issues +{% 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)) -- cgit v1.2.3-65-gdbad