Setting distinction between development and public server

 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

  1. Keep settings.py in version control safely by mboersma 4 years, 11 months ago
  2. Language aware template loader by rmt 2 years, 10 months ago
  3. showing environment variables in the django admin by tonemcd 2 years ago
  4. Support for permissions for anonymous users in django ModelBackend by jb 3 months ago
  5. Simple Plone Migration by msm-art 4 years ago

Comments

mboersma (on March 15, 2007):

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

#

(Forgotten your password?)