Skip to content

before_first_request and url_for #4978

Answered by davidism
phistrom asked this question in Q&A
Discussion options

You must be logged in to vote

You can set the SERVER_NAME to localhost:8000 during development.

https://flask.palletsprojects.com/en/2.2.x/appcontext/#manually-push-a-context shows how to push an app context during the factory function.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@phistrom

This comment has been hidden.

Answer selected by davidism
Comment options

You must be logged in to vote
1 reply
@phistrom
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #4977 on February 14, 2023 21:05.