aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/grumpy.py')
-rw-r--r--frontend/grumpy.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/frontend/grumpy.py b/frontend/grumpy.py
index 8d106a6..5c0193c 100644
--- a/frontend/grumpy.py
+++ b/frontend/grumpy.py
@@ -32,6 +32,17 @@ class GrumpyView(FlaskView):
else:
abort(404)
+ @route('/package/<categoryname>/<packagename>', methods=['GET'])
+ def package(self, categoryname, packagename):
+ category = models.Category.query.filter_by(name=categoryname).first()
+ package = models.Package.query.filter_by(category=category,name=packagename).first()
+ pkgcheck = models.PkgCheck.query.filter_by(package=package)
+
+ if package:
+ return render_template('package.html', category=category, package=package, pkgcheck=pkgcheck)
+ else:
+ abort(404)
+
class SetupView(FlaskView):
@route('/', methods=['GET', 'POST']) # FIXME: Can we enable POST without giving a rule override from the automatic, or handle this some other better way with wtforms setup?
def index(self):