-1
My Django application should run two environments: one for development and one for production.
When running in the development environment, access to application by 127.0.0.1 and when production access, I use my domain www normally.
In the application code, I need to know what environment I am in and for that I use the variable DEBUG of the archive settings.py. I know I can check the hostnames of the environments:
DEBUG = (socket.gethostname() == 'ambiente_dev')
However, I saw that in the documentation there is a configuration called INTERNAL_IPS. If I put the development environment IP in this tuple, like this:
INTERNAL_IPS = (
'127.0.0.1',
)
The variable DEBUG will automatically get the value True when I run the application in the development environment?