Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add self.options so options can be retrived from within the blueprint #970

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions flask/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,11 @@ def register_blueprint(self, blueprint, **options):
.. versionadded:: 0.7
"""
first_registration = False

#Added by Gilles. Allows to pass options to a blue print
#And retrieve it within the blueprint
self.options_blueprints=options

if blueprint.name in self.blueprints:
assert self.blueprints[blueprint.name] is blueprint, \
'A blueprint\'s name collision occurred between %r and ' \
Expand Down