diff --git a/.gitignore b/.gitignore index 053755d..dfadbfc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# secrets +borgweb/borgweb/secrets.py + # pycharm .idea/ diff --git a/borgweb/borgweb/__init__.py b/borgweb/borgweb/__init__.py index e69de29..293bba4 100644 --- a/borgweb/borgweb/__init__.py +++ b/borgweb/borgweb/__init__.py @@ -0,0 +1 @@ +from .secrets import SECRET_KEY diff --git a/borgweb/borgweb/settings.py b/borgweb/borgweb/settings.py index 34d66cf..eeec039 100644 --- a/borgweb/borgweb/settings.py +++ b/borgweb/borgweb/settings.py @@ -12,6 +12,8 @@ https://docs.djangoproject.com/en/3.2/ref/settings/ from pathlib import Path +from . import SECRET_KEY as __SECRET_KEY + # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent @@ -20,7 +22,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent # See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = 'django-insecure-%q(qb+$il2@1=6_xbo$8%2b+a$g)^g5mzdh@s8n!m$j9esj(dw' +SECRET_KEY = __SECRET_KEY # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True