préparations prod

This commit is contained in:
nyanloutre 2019-09-22 13:15:19 +02:00
parent c9e613adda
commit bc4f5684b7
8 changed files with 43 additions and 9 deletions

View file

@ -19,13 +19,6 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__fil
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '%y$(+on3*nzj0*fnq-@#=u4w_x-$4=l12+9be^xbq92nj5%0cd'
# SECURITY WARNING: don't run with debug turned on in production!
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
@ -89,5 +82,4 @@ USE_TZ = True
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'

View file

@ -2,6 +2,10 @@ from .base import *
DEBUG = True
ALLOWED_HOSTS = []
SECRET_KEY = '%y$(+on3*nzj0*fnq-@#=u4w_x-$4=l12+9be^xbq92nj5%0cd'
# Database
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
@ -11,3 +15,5 @@ DATABASES = {
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')

View file

@ -17,3 +17,20 @@ AUTH_PASSWORD_VALIDATORS = [
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
DEBUG = False
ALLOWED_HOSTS = ["musique-meyenheim.fr"]
SECRET_KEY = os.environ['SECRET_KEY']
VAR_DIR = os.environ['VAR_DIR']
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(VAR_DIR, 'db.sqlite3'),
}
}
MEDIA_ROOT = os.path.join(VAR_DIR, 'media')

View file

@ -17,7 +17,7 @@ from django.contrib import admin
from django.urls import include, path
from django.contrib.staticfiles.urls import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from .settings import base as settings
from django.conf import settings
urlpatterns = [
path('evenements/', include('timeline.urls')),