These are chat archives for django/django

21st
Apr 2017
Josue Barrios Rodriguez
@joshua1983
Apr 21 2017 02:55
Hi, I have a error ModuleNotFoundError: No module named 'myProject.wsgi' when I try to run over gunicorn, some knows why?
:]
@elcolie
Apr 21 2017 05:24
@joshua1983 You have to stay in the correct directory. They are 2 factors.
  1. You command line location
  2. You wsgi.py
ross bai
@rossbai1_twitter
Apr 21 2017 06:05
Is there way to package the source code to distribute ? Thanks
Josue Barrios Rodriguez
@joshua1983
Apr 21 2017 12:48
thanks @elcolie it's a bad directory location in command line
Josue Barrios Rodriguez
@joshua1983
Apr 21 2017 15:46
I have a question, with myProject, I has been made with django templates normally, but I want to comunicate with a android app through JSON like a API rest. The problem is, what about CSRF token?, should I disable?, or how to configure just this module like django-rest-framework and other modules like django ?
Kaushal Kumar
@kaushal087
Apr 21 2017 18:55
I want to run a shell command from my django application. It works fine if I run it using manage.py runserver but the command doesn't work on production(nginx + gunicorn).
os.system(command) and subprocess.check_call(command)
Both worksin development in but not in production.
MBijman
@MBijman
Apr 21 2017 21:15
@kaushal087 what is the stack you run on?
@joshua1983 take a look at django-rest-framework they have some excellent tutorials