-
Notifications
You must be signed in to change notification settings - Fork 68
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
fix: before_first_request deprecation #440
Changes from all commits
24db99b
fad08e6
bb7b78c
b988b63
9175c6c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -77,7 +77,7 @@ def role_to_dict(role): | |||||
) | ||||||
|
||||||
|
||||||
def create_blueprint(app): | ||||||
def create_rest_blueprint(app): | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
nit: since we're in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. my thinking was, that i don't have to add lines like |
||||||
"""Conditionally creates the blueprint.""" | ||||||
blueprint = Blueprint("invenio_accounts_rest_auth", __name__) | ||||||
|
||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: I would also keep the
blueprint
for backwards compat.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't know how, because the variable doesn't exist anymore in
settings.py
. that was the reason to move thedef login
function intosettings.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and to be clear, as i understand it is also not possible to create this variable here, because i would have to call
create_settings_blueprint
here at a time where thecurrent_app
is not accessibleThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or should i do it that way, that i move the
blueprint = Blueprint()
outside of thecreate_settings_blueprint
function?