#!/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
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)
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"