Need to reset app view functions to prevent Flask assertion error on resetting view functions.

This commit is contained in:
Steve Pulec 2013-06-25 12:36:21 -04:00
parent dd3cfe5ab6
commit 87c86bb902

View File

@ -26,6 +26,8 @@ class RegexConverter(BaseConverter):
def configure_urls(service): def configure_urls(service):
backend = globals()["{}_backend".format(service)] backend = globals()["{}_backend".format(service)]
from werkzeug.routing import Map from werkzeug.routing import Map
# Reset view functions to reset the app
app.view_functions = {}
app.url_map = Map() app.url_map = Map()
app.url_map.converters['regex'] = RegexConverter app.url_map.converters['regex'] = RegexConverter
for url_path, handler in backend.flask_paths.iteritems(): for url_path, handler in backend.flask_paths.iteritems():