return RodelbahnController().list()
return RodelbahnController().list()
-@app.route("/rodelbahn/update")
-def rodelbahn_update():
- pass
-
-
@app.route("/rodelbahn/view/<int:id>")
def rodelbahn_view(id):
get_db()
return RodelbahnController().view(id)
@app.route("/rodelbahn/view/<int:id>")
def rodelbahn_view(id):
get_db()
return RodelbahnController().view(id)
+@app.route("/rodelbahn/update")
+def rodelbahn_update():
+ get_db()
+ return RodelbahnController().update()
+
+
@app.route("/rodelbahn/update_regioncache")
def rodelbahn_update_regioncache():
pass
@app.route("/rodelbahn/update_regioncache")
def rodelbahn_update_regioncache():
pass
-#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
import paginate
import sqlalchemy as sa
return render_genshi_template('rodelbahn_view.html', c=c)
def update(self):
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)
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)
msg = msg.replace('\n', '; ')
if len(e.args) == 3: session['flash'] = "Fehler bei Rodelbahn '{0}': {1}".format(title, msg)
else: session['flash'] = str(e)
# Redirect to result page
# 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"
def update_regioncache(self):
"Updates the wrregioncache table from the wiki"