In flask/helpers.py, near the top of url_for() there is this code:
appctx = _app_ctx_stack.top
reqctx = _request_ctx_stack.top
if appctx is None:
raise RuntimeError('Attempted to generate a URL with the application '
'context being pushed. This has to be executed ')
It looks like that RuntimeError message is cut off. This has to be executed when? :)
...when an application context is available?