Reputation: 17876
I am referring this link https://docs.djangoproject.com/en/1.5/howto/deployment/wsgi/gunicorn/
for gunicorn and django deployment.
I am a bit confused with the tutorial
So for a typical Django project, invoking gunicorn would look like:
gunicorn myproject.wsgi:application
My django project is in /home/joe/fancyproject_dir
What would be the command line to invoke gunicorn for my project ?
'joe' is my username
Would it be
gunicorn fancyproject_dir.wsgi:application
or
gunicorn joe.wsgi:application
or something else?
Thanks for any help
Upvotes: 0
Views: 108
Reputation: 8506
The gunicorn command expect the argument to be <python package>:<wsgi identifier>
, so following this common project structure:
my_project_folder
|-my_project
| |-__init__.py
| |-wsgi.py
| |-settings.py
the command would be my_project.wsgi:application
, the trick is identifying the package by looking for the __init__.py
file.
Upvotes: 1