]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/commitdiff
gasthaus_update works now.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Thu, 27 Jul 2017 22:01:33 +0000 (22:01 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Thu, 27 Jul 2017 22:01:33 +0000 (22:01 +0000)
git-svn-id: http://www.winterrodeln.org/svn/wradmin/trunk@2683 7aebc617-e5e2-0310-91dc-80fb5f6d2477

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'))