def rodelbahn_update_regioncache():
return RodelbahnController().update_regioncache()
+@app.route("/rodelbahn/update_mapcache")
+def rodelbahn_update_mapcache():
+ return RodelbahnController().update_mapcache()
@app.route("/bericht/list")
def bericht_list():
flash(str(e), 'error')
# Redirect to result page
return redirect(url_for('rodelbahn_list'))
+
+ def update_mapcache(self):
+ """Updates the wrmappointcache and wrmappathcache tables from the wiki."""
+ c = model.meta.Session.connection()
+ try:
+ wrpylib.wrmwcache.update_wrmapcache(c)
+ model.meta.Session.commit()
+ flash('Die Landkarteninformationen aus dem Wiki wurden erfolgreich aktualisiesrt.', 'info')
+ except wrpylib.wrmwcache.UpdateCacheError as e:
+ flash(str(e), 'error')
+ # Redirect to result page
+ return redirect(url_for('rodelbahn_list'))
<a href="{{url_for('rodelbahn_update')}}" class="button">(1) Rodelbahnboxen auslesen und DB aktualisieren</a>
<a href="{{url_for('rodelbahn_update_regioncache')}}" class="button">(2) Rodelbahnen in den Regionslisten aktualisieren</a>
+<a href="{{url_for('rodelbahn_update_mapcache')}}" class="button">(3) Landkarten aktualisieren</a>
<p>{{paginator.pager('$link_first $link_previous $first_item bis $last_item von $item_count $link_next $link_last') | safe}}</p>