]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/blobdiff - wradmin/controllers/rodelbahn.py
rodelbahn_update works now.
[philipp/winterrodeln/wradmin.git] / wradmin / controllers / rodelbahn.py
index ab67570ecfd1bf797607d8d7ad50d5839fc369ba..5af866ecd80633439c3a9709fe08e1569f0e0f04 100644 (file)
@@ -1,7 +1,5 @@
 #!/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, url_for
+from flask import request, abort, redirect, session, url_for
 import paginate
 import sqlalchemy as sa
 
@@ -40,7 +38,7 @@ class RodelbahnController:
         return render_genshi_template('rodelbahn_view.html', c=c)
 
     def update(self):
-        "Updates the wrsledruncache table from the wiki"
+        """Updates the wrsledruncache table from the wiki"""
         c = model.meta.Session.connection()
         try:
             wrpylib.wrmwcache.update_wrsledruncache(c)
@@ -53,10 +51,8 @@ class RodelbahnController:
             msg = msg.replace('\n', '; ')
             if len(e.args) == 3: session['flash'] = "Fehler bei Rodelbahn '{0}': {1}".format(title, msg)
             else: session['flash'] = str(e)
-        session.save()
         # Redirect to result page
-        return redirect(url(controller='rodelbahn', action='list'))
-
+        return redirect(url_for('rodelbahn_list'))
 
     def update_regioncache(self):
         "Updates the wrregioncache table from the wiki"