-
-
Notifications
You must be signed in to change notification settings - Fork 16.2k
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
Handle app factory in FLASK_APP #2264
Comments
Should be |
Also handle
This solution only allows positional arguments (and named |
Down vote on this feature. The environ |
Something like I'm ±0 on this issue: It does make |
@ThiefMaster Actually I don't use I've always been using the |
…ASK_APP Handle app factory with arguments in FLASK_APP
I'm not that fond either with such flexibility in |
I merged a pull request yesterday which provides this functionality |
The PR looked good to me, and from what I could tell, this was @davidism's plan for the project, so I went ahead with it. Leaving this ticket open for further discussion, if any is needed. |
I really like the shortcut of being able to call the factory in uWSGI and Gunicorn config. I think the ease of setup outweighs the complexity here. If users want to use env vars instead, that's fine and should probably be documented as an alternative. |
FLASK_APP=myproject.app:create_app('dev')
Gunicorn does this with
eval
, which I'm not super happy with. Instead, we could useliteral_eval
to allow a simple list of arguments. The line should never be so complicated thateval
would be necessary anyway.The text was updated successfully, but these errors were encountered: