简体   繁体   中英

gunicorn running django on virtual env

I'm following tutorial from http://www.marinamele.com/2013/12/how-to-set-django-app-on-heroku-part-i.html and I can't pass the section with foreman -> guicorn configuration. My django app is in myproject directory.

When I'm trying to run command from my virtualenv, console freeze, but django app works in my browser - but foreman can't work properly

(myenv) ... gunicorn myproject.wsgi

But when I run:

(myenv) ... gunicorn myproject:wsgi

I got Failed to find application: 'myproject' .

my requirements.txt:

Django==1.6.5
argparse==1.2.1
gunicorn==19.0.0
wsgiref==0.1.2

this might of some help; https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/gunicorn/

especially below 2 lines

This requires that your project be on the Python path; the simplest way to ensure that is to run this command from the same directory as your manage.py file

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM