Monday, November 24, 2014

Re: How do I supply an appropriate application.wsgi to Gunicorn?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJUc6qKAAoJEC0ft5FqUuEhnhkP/RFCJyiOxiZf9+JJ+OjZ5dmO
o+nqBmEOV5zDKe5D6/fLnvQOrRW1l4IdySoYT+iXwIihO5+q5frUo+R7ajDvkosX
PCkjK81HjBBkv/3MFA39Jc4s4O35uOFLTOCuu+hObPqu1he7nzQ5IUX9Bn8V0yK/
EB5U65L/x/pfkCFbRQjRsnkqbjlWO5UfX5yrarRnJHxx+iZjVdeDsxmWaxWZtNt6
d0kklbRK5/qG8aKdvAR1gE7/tBDo/e1GPzwUbNkO0XdRSoIs/YXc/hjUFf0CF3fW
Cw+8s5+IJmB2XOKbKJb51gFrzz4Kvgys5Mw9tj4vAOQl3goUOBIS72idAMQ34kOj
Q4EcA3wAfevIARdUR5ebb1654FHhakmpYX8hrmOzm7MxinKW0gdIGk4q2W/sa7Kq
ff5J4nmnj76N6JB+GpF0JQXNFAohOZHXFdAE4hi0Fkju/1pP3ZR9J4jibH7v0UVx
PxPd+p8KsbXbt/4UtEWr6phkhgR7j5AY1GfMdXWeYT7V74jNwcqnfd7uGrL5HMJa
Dm8z+9dgAyct5lIeVmr9YxZQM78XzkX1pAnl9OtBYs6yqef3u/ZGsoeDB9Z+7x2J
fB/AWXKlsJ/SGA5vT5wGU53Om4mwklW7ViJl6yBuf06d02UPp+BH36HK7zwp8Xyd
UR3NGb0pJ/9MahltEihT
=lKR0
-----END PGP SIGNATURE-----
On 11/24/2014 02:56 PM, Christos Jonathan Seth Hayward wrote:
> Thanks so much!
>
> Could you confirm the invocation?
>
> cjsh@ps306627:~/cynthia$ gunicorn cynthia.wsgi 0.0.0.0:7777
>
> usage: gunicorn [OPTIONS] [APP_MODULE]
>
> gunicorn: error: No application module specified.

That's the right invocation, but you need your python path set up to
include the directory that has `manage.py` in it (when you actually run
a `manage.py` command, this happens automatically, but not when you run
gunicorn).

There are a variety of ways that can be done, the simplest is to run
your gunicorn command from the same directory that contains `manage.py`
and set the PYTHONPATH env var:

PYTHONPATH=`pwd` gunicorn cynthia.wsgi 0.0.0.0:7777

Carl

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5473AA8A.3080000%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment