Hello all,
In the Django docs they mention the following,
Where should this code live?
If your background is in plain old PHP (with no use of modern frameworks), you’re probably used to putting code under the Web server’s document root (in a place such as /var/www). With Django, you don’t do that. It’s not a good idea to put any of this Python code within your Web server’s document root, because it risks the possibility that people may be able to view your code over the Web. That’s not good for security.
Put your code in some directory outside of the document root, such as /home/mycode.
I am deploying my first django app and hate to admit that this is confusing the heck out of me. I read the topic on stack overflow concerning this topic and I am still having trouble with it. https://stackoverflow.com/questions/19389083/placing-code-outside-of-document-root-problems-with-apache-and-django
I have read both the python anywhere deployment procedures and the django girls and both do not mention this. What steps do I need to take when deploying my app to make sure my python code is not available to the public.
Additionally, I am a little confused about the relationship between NGINX and django. I edited the WSGI file as described in https://help.pythonanywhere.com/pages/DeployExistingDjangoProject
Is that all I need to do?! I thought that getting NGINX set up would be more involved.
Thanks for the help!