Browse Source

Implements local settings

pull/4/head
Yoann Piétri 7 years ago
parent
commit
1428bff926
  1. 26
      coopeV3/local_settings.example.py
  2. 24
      coopeV3/settings.py

26
coopeV3/local_settings.example.py

@ -0,0 +1,26 @@
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'Your secret key'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = ['Server ip']
# Admins
ADMINS = []
EMAIL_HOST = ""
SERVER_EMAIL = ""
# Database
# https://docs.djangoproject.com/en/2.1/ref/settings/#databases
DATABASES = {
'default': {
#'ENGINE': 'django.db.backends.sqlite3',
#'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}

24
coopeV3/settings.py

@ -12,6 +12,8 @@ https://docs.djangoproject.com/en/2.1/ref/settings/
import os
from .local_settings import *
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@ -19,14 +21,6 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '4q7i$qbv)fdz&%i@&!eb_x$x9119s8co8nx9e84@9#d8i)lso4'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = ['127.0.0.1']
# Application definition
INSTALLED_APPS = [
@ -78,18 +72,6 @@ TEMPLATES = [
WSGI_APPLICATION = 'coopeV3.wsgi.application'
# Database
# https://docs.djangoproject.com/en/2.1/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
# Password validation
# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators
@ -132,4 +114,4 @@ STATICFILES_DIRS = [
]
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
LOGIN_URL = '/users/login'
LOGIN_URL = '/users/login'

Loading…
Cancel
Save