Answer the question
In order to leave comments, you need to log in
Where to put code in a django project?
The documentation says:
Do not put any Python code in your web server's document root, because this risks people being able to view your code over the Internet. This is not good for security.
Place your code in some directory outside the document root, such as /home/mycode.
It's not entirely clear to me, I've included a screenshot below. The python code is written to be placed outside the root directory. In my case, the root folder is myvenv. Am I not allowed to store python files in the root folder, as I did with manage.py, that is, create additional folders in myvenv and place them there, as is done with project_A, which contains __init__.py, settings.py, etc?
Answer the question
In order to leave comments, you need to log in
Code should be hosted in applications . Only this is done not for the sake of security, but for decomposition and maintainability.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question