Bladeren bron

Add settings_local.py to override settings in settings.py

Andrew Klopper 6 jaren geleden
bovenliggende
commit
1cb20ced02
4 gewijzigde bestanden met toevoegingen van 8 en 3 verwijderingen
  1. 1 1
      .gitignore
  2. 1 0
      requirements.in
  3. 2 1
      requirements.txt
  4. 4 1
      xword/settings.py.example

+ 1 - 1
.gitignore

@@ -1,4 +1,4 @@
1 1
 /venv/
2
-/xword/settings.py
2
+/xword/settings_local.py
3 3
 __pycache__
4 4
 *.pyc

+ 1 - 0
requirements.in

@@ -1,3 +1,4 @@
1
+chaussette
1 2
 django
2 3
 opencv-python
3 4
 peakutils

+ 2 - 1
requirements.txt

@@ -5,6 +5,7 @@
5 5
 #    pip-compile
6 6
 #
7 7
 asgiref==3.2.3            # via django
8
+chaussette==1.3.0
8 9
 click==7.0                # via pip-tools
9 10
 django==3.0.2
10 11
 numpy==1.18.1             # via opencv-python, peakutils, scipy
@@ -13,5 +14,5 @@ peakutils==1.3.3
13 14
 pip-tools==4.4.0
14 15
 pytz==2019.3              # via django
15 16
 scipy==1.4.1              # via peakutils
16
-six==1.14.0               # via pip-tools
17
+six==1.14.0               # via chaussette, pip-tools
17 18
 sqlparse==0.3.0           # via django

+ 4 - 1
xword/settings.py.example

@@ -3,11 +3,12 @@ import os
3 3
 OVERRIDE_ME = None
4 4
 
5 5
 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
6
+
6 7
 SECRET_KEY = OVERRIDE_ME
7 8
 
8 9
 DEBUG = False
9 10
 
10
-ALLOWED_HOSTS = [OVERRIDE_ME]
11
+ALLOWED_HOSTS = OVERRIDE_ME
11 12
 
12 13
 INSTALLED_APPS = [
13 14
     'home.apps.HomeConfig',
@@ -40,3 +41,5 @@ WSGI_APPLICATION = 'xword.wsgi.application'
40 41
 FILE_UPLOAD_HANDLERS = [
41 42
     'django.core.files.uploadhandler.TemporaryFileUploadHandler'
42 43
 ]
44
+
45
+from .settings_local import *