-#!/usr/bin/python3.4
from flask import request, abort, redirect, url_for, flash, render_template
import paginate
import sqlalchemy as sa
flash('Die Rodelbahnliste wurde erfolgreich aktualisiert.', 'info')
except wrpylib.wrmwcache.UpdateCacheError as e:
title = str(e.args[1])
- title = wrpylib.mwmarkup.to_title(title)
+ title = wrpylib.mwmarkup.dbkey_to_title(title)
msg = str(e.args[2])
msg = msg.replace('\n', '; ')
if len(e.args) == 3:
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'))