1 2 3 4 5 6 7 8 9 10 | # dev_environment.py at site-packages
"""
For checking whether the code is executed on the public or local server
>>> try:
... from dev_environment import *
... except:
... is_dev_environment = False
...
"""
is_dev_environment = True
|
More like this
- Keep settings.py in version control safely by mboersma 5 years, 2 months ago
- Language aware template loader by rmt 3 years, 1 month ago
- Load a local settings file for dev/test environments by menendez 3 years, 9 months ago
- Support for permissions for anonymous users in django ModelBackend by jb 6 months, 2 weeks ago
- showing environment variables in the django admin by tonemcd 2 years, 3 months ago
Comments
Here are two documents at the Django wiki that have related information on best practices for settings.py files:
SplitSettings
Dos and Donts for App Writers
#