Managing local settings
by onlinelife on Oct.16, 2009, under Personal interest
Sometimes it is nice to be able to configure Django settings for a single host and not have tons of conflicts in the next svn up, I personally use this solution as the settings. py Django only Python code. In the last line of the file that I am not one:
from local_settings import *
It is, as I mixed for the importation of local_settings.py and obtains each global symbol in the current namespace, so I have all the options to override. An example would be the configuration of the global settings.py used as SQLite database backend for the project, but in the production environment database_ * override options in the local_settings.py. This is also true for caching – not many developers run a PostgreSQL and memcached on your mobile.