Browse Source

Pridan externi django secret key soubor

remotes/origin/feincms
Tomas Gavenciak 10 years ago
parent
commit
c891d1b194
  1. 3
      .gitignore
  2. 4
      mamweb/settings.py
  3. 10
      mamweb/settings_common.py

3
.gitignore

@ -17,3 +17,6 @@
# aux files # aux files
*.pyc *.pyc
*.swp *.swp
# secrets
/django.secret

4
mamweb/settings.py

@ -1,3 +1,4 @@
import os.path
from .settings_common import * from .settings_common import *
# Local development settings # Local development settings
@ -10,9 +11,6 @@ INSTALLED_APPS += (
'django_extensions', 'django_extensions',
) )
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = ')^u=i65*zmr_k53a*@f4q_+ji^o@!pgpef*5&8c7zzv9l+zo)n'
# 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

10
mamweb/settings_common.py

@ -147,6 +147,16 @@ CKEDITOR_CONFIGS = {
}, },
} }
# SECURITY WARNING: keep the secret key used in production secret!
# Create file 'django.secret' in every install (it is not kept in git)
try:
with open(os.path.join(os.path.dirname(__file__), '..', 'django.secret')) as f:
SECRET_KEY = f.readline().strip()
except:
SECRET_KEY = ')^u=i65*zmr_k53a*@f4q_+ji^o@!pgpef*5&8c7zzdqwkdlkj'
# MaM specific # MaM specific
SEMINAR_RESENI_DIR = os.path.join(BASE_DIR, 'media', 'reseni') SEMINAR_RESENI_DIR = os.path.join(BASE_DIR, 'media', 'reseni')

Loading…
Cancel
Save