These are chat archives for django/django

22nd
Apr 2017
Steven Liao
@Penspinner
Apr 22 2017 03:14
"Doesn't work" is not specific enough.
Kaushal Kumar
@kaushal087
Apr 22 2017 06:36
@MBijman I am running on Linux Mint 18 (64 bit),
pip freeze shows
appdirs==1.4.3
Django==1.10.5
django-timedeltafield==0.7.10
gunicorn==19.7.1
MySQL-python==1.2.5
oauthlib==2.0.2
olefile==0.44
packaging==16.8
Pillow==4.0.0
PyJWT==1.4.2
pyparsing==2.2.0
python-openid==2.2.5
python-social-auth==0.3.6
requests==2.13.0
requests-oauthlib==0.8.0
six==1.10.0
social-auth-app-django==1.1.0
social-auth-core==1.2.0
Python2
Server nginx + gunicorn
I have followed the above tutorial to deploy on nginx.
os.system(command) runs perfectly while on manage.py runserver but it doesn't do anything on nginx.
And other problem is even if DEBUG=False. It shows me all the errors like DEBUG=True.
MBijman
@MBijman
Apr 22 2017 09:45
so nginx is not running your code, nginx is the webserver
when it receives a request, it will reverse proxy it to gunicorn
and gunicorn runs your code in production, instead python manager runserver
MBijman
@MBijman
Apr 22 2017 10:07
running a command on linux could be dangerous
maybe it doenst have the right permission level to run the command, when running under gunicorn
what is the user you set here
/etc/systemd/system/gunicorn.service
what is the command you want to run?