]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/blobdiff - wradmin/controllers/gasthaus.py
gasthaus_view.html now uses jinja2.
[philipp/winterrodeln/wradmin.git] / wradmin / controllers / gasthaus.py
index 7e25f68a492b352b8b65db5189e3ee62fb191a33..4dcf9c3d661df23c3eaae229a3bf87ead2dce513 100644 (file)
@@ -7,7 +7,6 @@ import wrpylib.wrmwcache
 import wrpylib.mwmarkup
 
 import wradmin.model as model
-from wradmin.genshi import render_genshi_template, TemplateContext
 
 
 class GasthausController:
@@ -24,11 +23,10 @@ class GasthausController:
     def view(self, id):
         """Displays an inn"""
         q = model.meta.Session.query(model.WrInnCache)
-        c = TemplateContext()
-        c.inn =  q.get(id)
-        if c.inn is None:
+        inn = q.get(id)
+        if inn is None:
             abort(404)
-        return render_genshi_template('gasthaus_view.html', c=c)
+        return render_template('gasthaus_view.html', inn=inn)
 
     def update(self):
         """Updates the wrinncache table from the wiki"""