]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/blobdiff - wradmin/controllers/gasthaus.py
Fixed: Avoid calling function to_title (that was renamed to dbkey_to_title).
[philipp/winterrodeln/wradmin.git] / wradmin / controllers / gasthaus.py
index 7e25f68a492b352b8b65db5189e3ee62fb191a33..95faba71240d183e55bccbffd63633d3fd206961 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"""
@@ -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: