X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wradmin.git/blobdiff_plain/80a4a459017940a4bcb93e76400128440f1934a9..32d339dfffa7356a9d1aad0fbec62d400e86ba8f:/wradmin/controllers/gasthaus.py diff --git a/wradmin/controllers/gasthaus.py b/wradmin/controllers/gasthaus.py index 7e25f68..95faba7 100644 --- a/wradmin/controllers/gasthaus.py +++ b/wradmin/controllers/gasthaus.py @@ -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""" @@ -39,7 +37,7 @@ class GasthausController: flash('Die Gasthausliste wurde erfolgreich aktualisiert.', 'info') except wrpylib.wrmwcache.UpdateCacheError as e: title = str(e.args[1]) - title = wrpylib.mwmarkup.to_title(title) + title = wrpylib.mwmarkup.dbkey_to_title(title) msg = str(e.args[2]) msg = msg.replace('\n', '; ') if len(e.args) == 3: