]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/blobdiff - wradmin/controllers/rodelbahn.py
Whitespace cosmetics.
[philipp/winterrodeln/wradmin.git] / wradmin / controllers / rodelbahn.py
index 71e633f424b69c4800c52e8cfefb6eb6e29f6223..f6bd26d31acdc342f3bb7ff8c4890e2bfe0e5f28 100644 (file)
@@ -43,7 +43,7 @@ class RodelbahnController:
             flash('Die Rodelbahnliste wurde erfolgreich aktualisiert.', 'info')
         except wrpylib.wrmwcache.UpdateCacheError as e:
             title = str(e.args[1])
             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:
             msg = str(e.args[2])
             msg = msg.replace('\n', '; ')
             if len(e.args) == 3:
@@ -64,3 +64,15 @@ class RodelbahnController:
             flash(str(e), 'error')
         # Redirect to result page
         return redirect(url_for('rodelbahn_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'))