Browse Source

Pridan externi django secret key soubor

remotes/origin/feincms
Tomas Gavenciak 9 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
*.pyc
*.swp
# secrets
/django.secret

4
mamweb/settings.py

@ -1,3 +1,4 @@
import os.path
from .settings_common import *
# Local development settings
@ -10,9 +11,6 @@ INSTALLED_APPS += (
'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!
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
SEMINAR_RESENI_DIR = os.path.join(BASE_DIR, 'media', 'reseni')

Loading…
Cancel
Save