]> git.0d.be Git - earwig.git/commitdiff
settings: add support for local settings
authorFrédéric Péters <fpeters@0d.be>
Sat, 1 Sep 2018 07:31:49 +0000 (09:31 +0200)
committerFrédéric Péters <fpeters@0d.be>
Sat, 1 Sep 2018 07:31:49 +0000 (09:31 +0200)
earwig/settings.py

index e2c014b3fcf6f29c16546ff4152ffa807a2bde36..263d02efd6b1e1b257b8ad86831c126f0125300e 100644 (file)
@@ -118,3 +118,9 @@ USE_TZ = True
 # https://docs.djangoproject.com/en/1.11/howto/static-files/
 
 STATIC_URL = '/static/'
+
+
+local_settings_file = os.environ.get('EARWIG_SETTINGS_FILE',
+        os.path.join(os.path.dirname(__file__), 'local_settings.py'))
+if os.path.exists(local_settings_file):
+    exec(open(local_settings_file).read())