Browse Source

Merge pull request #2746 from pallets/2742-empty-url-prefix

allow empty prefix and no lead slash in bp route
pull/2748/head
David Lord 7 years ago committed by GitHub
parent
commit
73bf519dad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      flask/blueprints.py

2
flask/blueprints.py

@ -65,7 +65,7 @@ class BlueprintSetupState(object):
to the application. The endpoint is automatically prefixed with the
blueprint's name.
"""
if self.url_prefix:
if self.url_prefix is not None:
rule = '/'.join((self.url_prefix, rule.lstrip('/')))
options.setdefault('subdomain', self.subdomain)
if endpoint is None:

Loading…
Cancel
Save