+ flash('Die Rodelbahnliste wurde erfolgreich aktualisiert.', 'info')
+ except wrpylib.wrmwcache.UpdateCacheError as e:
+ title = str(e.args[1])
+ title = wrpylib.mwmarkup.dbkey_to_title(title)
+ msg = str(e.args[2])
+ msg = msg.replace('\n', '; ')
+ if len(e.args) == 3:
+ flash("Fehler bei Rodelbahn '{0}': {1}".format(title, msg), 'error')
+ else:
+ flash(str(e), 'error')
+ # Redirect to result page
+ return redirect(url_for('rodelbahn_list'))
+
+ def update_regioncache(self):
+ """Updates the wrregioncache table from the wiki"""
+ c = model.meta.Session.connection()
+ try:
+ wrpylib.wrmwcache.update_wrregioncache(c)
+ model.meta.Session.commit()
+ flash('Die Rodelbahneinträge in den Regionslisten wurden erfolgreich aktualisiert.', 'info')