diff MoinMoin/app.py @ 266:7a6b116afa20

upgrade to flask 0.7.1 (not compatible to older flasks) to upgrade to flask 0.7.1 you need to activate your virtual env and run: pip install --upgrade flask what I had to do for upgrading moin src to flask 0.7.1: ran the flask upgrade script, review what it did added template_folder='templates' to BluePrint initializers where needed moved templates to a subdirectory having the shortname of the BluePrint require flask >=0.7.1 in setup.py
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 02 Jul 2011 20:18:34 +0200
parents e73843b02d9d
children e969c9318772
line wrap: on
line diff
--- a/MoinMoin/app.py	Tue Jun 28 19:45:17 2011 +0200
+++ b/MoinMoin/app.py	Sat Jul 02 20:18:34 2011 +0200
@@ -103,21 +103,21 @@
     from MoinMoin.apps.frontend import frontend
     frontend.before_request(before_wiki)
     frontend.after_request(after_wiki)
-    app.register_module(frontend)
+    app.register_blueprint(frontend)
     from MoinMoin.apps.admin import admin
     admin.before_request(before_wiki)
     admin.after_request(after_wiki)
-    app.register_module(admin, url_prefix='/+admin')
+    app.register_blueprint(admin, url_prefix='/+admin')
     from MoinMoin.apps.feed import feed
     feed.before_request(before_wiki)
     feed.after_request(after_wiki)
-    app.register_module(feed, url_prefix='/+feed')
+    app.register_blueprint(feed, url_prefix='/+feed')
     from MoinMoin.apps.misc import misc
     misc.before_request(before_wiki)
     misc.after_request(after_wiki)
-    app.register_module(misc, url_prefix='/+misc')
+    app.register_blueprint(misc, url_prefix='/+misc')
     from MoinMoin.apps.serve import serve
-    app.register_module(serve, url_prefix='/+serve')
+    app.register_blueprint(serve, url_prefix='/+serve')
     clock.stop('create_app register')
     clock.start('create_app flask-cache')
     cache = Cache()
@@ -146,7 +146,7 @@
             FileSystemLoader(app.cfg.template_dirs),
             app.jinja_env.loader,
         ])
-    app.error_handlers[403] = themed_error
+    app.register_error_handler(403, themed_error)
     clock.stop('create_app flask-themes')
     clock.stop('create_app total')
     del clock