]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/blobdiff - wradmin/controllers/gasthaus.py
gasthaus_update works now.
[philipp/winterrodeln/wradmin.git] / wradmin / controllers / gasthaus.py
index bf19ad0a5d891e6640f3def6acb9e48d59717324..a20566e497c22802fe5ef20e481665f4e996d975 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/python3.4
 #from pylons import request, response, session, url, tmpl_context as c
 #from pylons.controllers.util import abort, redirect
-from flask import request, abort
+from flask import request, abort, redirect, session, url_for
 import paginate
 import sqlalchemy as sa
 
@@ -31,10 +31,9 @@ class GasthausController:
         if c.inn is None:
             abort(404)
         return render_genshi_template('gasthaus_view.html', c=c)
-    
-    
+
     def update(self):
-        "Updates the wrinncache table from the wiki"
+        """Updates the wrinncache table from the wiki"""
         c = model.meta.Session.connection()
         try:
             wrpylib.wrmwcache.update_wrinncache(c)
@@ -47,7 +46,5 @@ class GasthausController:
             msg = msg.replace('\n', '; ')
             if len(e.args) == 3: session['flash'] = "Fehler bei Gasthaus '{0}': {1}".format(title, msg)
             else: session['flash'] = str(e)
-        session.save()
         # Redirect to result page
-        return redirect(url(controller='gasthaus', action='list'))
-
+        return redirect(url_for('gasthaus_list'))