Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Flask.inject_url_defaults() incorrectly splits Blueprint's name #494

Open
ekoka opened this Issue · 0 comments

1 participant

ekoka
ekoka

The Flask.inject_url_defaults() function splits the endpoint at the wrong location to retrieve the name of the blueprint. This causes url_for() not to work properly for blueprints when combined with Blueprint.url_defaults()

e.g.
endpoint = "catalogue.admin.products.index"
bp = endpoint.split('.', 1)[0]

bp is now 'catalogue' rather than 'catalogue.admin.products'

I presume rsplit() would be more appropriate than split() for this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.