Am 02.03.22 um 04:23 schrieb Mike Dewhirst: > ... where you write get_secret_key() to pull it from the environment or a > file somewhere which is not in your repository.
A variant of this that I like is to have a file like localconfig.example in the repository next to settings.py that contains e.g. DATABASES = ... # dummy or default config SECRET_KEY = 'example' On installation, the file is then copied to localconfig.py, where it is *ignored* by svn, git, etc. The file is then customized for production, development, … In settings.py, there is from project_dir import localconfig # ... DEBUG = localconfig.DEBUG SECRET_KEY = localconfig.SECRET_KEY DATABASES = localconfig.DATABASES # ... This works very well and is simple, safe and convenient. Best regards, Carsten -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/27159e6a-0472-97c5-8816-7c5a46a3eb89%40cafu.de.