from wradmin.app import db
from wradmin.model import WrSledrunCache, WrReport
+from wradmin.template_helper import PylonsHelper
class RodelbahnController:
items_per_page=25)
return render_template('rodelbahn_view.html', sledding=sledrun, paginator=paginator)
+ def json_edit(self, sledrun_id):
+ q = db.session.query(WrSledrunCache)
+ sledrun = q.get(sledrun_id)
+ if sledrun is None:
+ abort(404)
+ h = PylonsHelper()
+ return render_template('json_editor.html',
+ schema_url=url_for('static', filename='schema_v1.json'),
+ #json_url=url_for('static', filename='latschenhuette.json')
+ json_url=h.wiki(sledrun.page_title)
+ )
+
def update(self):
"""Updates the wrsledruncache table from the wiki"""
c = db.session.connection()