On Oct 22, 10:09 pm, Kenneth Gonsalves <law...@au-kbc.org> wrote: > 5. Note: settings.py is not put under version control as this holds > sensitive information and paths differ according to the server it is on. > I create a default.settings.py which has the sensitive information > removed. That is kept under version control.
Another approach to this problem: settings.py IS in version control and includes settings that are universal to all environments (local dev, staging, production), but has dummy info or empty strings for passwords or paths or other information that vary between environments. local_settings.py is NOT in version control, and redefines any passwords or settings specific to the various environments with actual values. Technically, it should not be necessary to define dummy values in settings.py first, but we've seen issues where things break if you don't set them first and then override them. No idea why. The following bit at the end of settings.py looks for and reads in info from local_settings. ############################## # Default settings go above this line. # This allows local settings to override. ############################## try: from local_settings import * except ImportError, exp: pass -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.