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
How do I pass an arg to the application that gunicorn runs? #135
Comments
In your application module you can do something like this:
And then you start your app like such:
|
answered. |
@benoitc it's been several years, can you tell me if this answer is still correct? I've not been able to get this approach to work for me. |
@pellunutty I don't think the answer is correct now. You can subclass one of the application classes (e.g. |
please use the following codo to get arguments,then the error will be fixed |
Right now, I start my web app like this:
I want to feed some parameters to the application function inside my webapp.py. In particular, I want to use a config file to adjust how my webapp works.
I read the docs for how to configure gunicorn with a config file, but I don't want that.
I tried this and got an error:
As far as I can tell, gunicorn tried to find a callable named named "application dev.cfg".
Any ideas?
The text was updated successfully, but these errors were encountered: