You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The blueprint name registered for the app doesn't match that registered for the route.
The app is registered with blueprint name debubtoolbar
module = Blueprint('debugtoolbar', __name__)
But the route is registered with blueprint name _debug_toolbar as implied by the endpoint name _debug_toolbar.static. Thus, in a consuming app, flask.request.blueprint returns _debug_toolbar, which does not exist in flask.current_app.blueprints.
Three potential fixes - both simple, but may break existing consumers
Change the registered BP name to _debug_toolbar
Change the endpoint to use the BP name debugtoolbar, and then change the two references of url_for
Ideally in both cases, you'd register the route under the context of the BP to avoid the issue going forward. For example, if you use the second solution
The blueprint name registered for the app doesn't match that registered for the route.
The app is registered with blueprint name
debubtoolbar
But the route is registered with blueprint name
_debug_toolbar
as implied by the endpoint name_debug_toolbar.static
. Thus, in a consuming app,flask.request.blueprint
returns_debug_toolbar
, which does not exist inflask.current_app.blueprints
.Three potential fixes - both simple, but may break existing consumers
_debug_toolbar
debugtoolbar
, and then change the two references ofurl_for
Ideally in both cases, you'd register the route under the context of the BP to avoid the issue going forward. For example, if you use the second solution
References in
url_for
, for context:toolbar.py
panels/template.py
The text was updated successfully, but these errors were encountered: