import wrpylib.mwmarkup
import wradmin.model as model
-from wradmin.genshi import render_genshi_template, TemplateContext
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"""