Move secret key to ignored secrets.py file

This commit is contained in:
George Lacey 2021-05-06 07:13:23 +01:00
parent c6b5ddbd2e
commit f0b685d802
3 changed files with 7 additions and 1 deletions

3
.gitignore vendored
View File

@ -1,3 +1,6 @@
# secrets
borgweb/borgweb/secrets.py
# pycharm # pycharm
.idea/ .idea/

View File

@ -0,0 +1 @@
from .secrets import SECRET_KEY

View File

@ -12,6 +12,8 @@ https://docs.djangoproject.com/en/3.2/ref/settings/
from pathlib import Path from pathlib import Path
from . import SECRET_KEY as __SECRET_KEY
# Build paths inside the project like this: BASE_DIR / 'subdir'. # Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent 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/ # See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret! # 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! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True DEBUG = True