Browse Source

It resolves problems with blueprints and url_prefix

pull/1339/head
Guillem Julià Blasi 10 years ago
parent
commit
a27bc8be79
  1. 5
      flask/blueprints.py

5
flask/blueprints.py

@ -147,7 +147,10 @@ class Blueprint(_PackageBoundObject):
self._got_registered_once = True
state = self.make_setup_state(app, options, first_registration)
if self.has_static_folder:
state.add_url_rule(self.static_url_path + '/<path:filename>',
rule = self.static_url_path
if self.url_prefix == '/':
rule = self.name + rule
state.add_url_rule(rule + '/<path:filename>',
view_func=self.send_static_file,
endpoint='static')

Loading…
Cancel
Save