2 Django settings for chloro project.
4 Generated by 'django-admin startproject' using Django 1.11.17.
6 For more information on this file, see
7 https://docs.djangoproject.com/en/1.11/topics/settings/
9 For the full list of settings and their values, see
10 https://docs.djangoproject.com/en/1.11/ref/settings/
16 from django.conf import global_settings
18 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
19 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
22 # Quick-start development settings - unsuitable for production
23 # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
25 # SECURITY WARNING: keep the secret key used in production secret!
28 # SECURITY WARNING: don't run with debug turned on in production!
34 # Application definition
36 DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
39 'django.contrib.auth',
40 'django.contrib.contenttypes',
41 'django.contrib.sessions',
42 'django.contrib.messages',
43 'django.contrib.staticfiles',
52 'django.middleware.security.SecurityMiddleware',
53 'django.contrib.sessions.middleware.SessionMiddleware',
54 'django.middleware.common.CommonMiddleware',
55 'django.middleware.csrf.CsrfViewMiddleware',
56 'django.contrib.auth.middleware.AuthenticationMiddleware',
57 'django.contrib.messages.middleware.MessageMiddleware',
58 'django.middleware.clickjacking.XFrameOptionsMiddleware',
61 ROOT_URLCONF = 'chloro.urls'
65 'BACKEND': 'django.template.backends.django.DjangoTemplates',
69 'context_processors': [
70 'django.template.context_processors.debug',
71 'django.template.context_processors.request',
72 'django.contrib.auth.context_processors.auth',
73 'django.contrib.messages.context_processors.messages',
79 WSGI_APPLICATION = 'chloro.wsgi.application'
83 # https://docs.djangoproject.com/en/1.11/ref/settings/#databases
87 'ENGINE': 'django.db.backends.postgresql',
94 # https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators
96 AUTH_PASSWORD_VALIDATORS = [
98 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
101 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
104 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
107 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
111 LOGIN_REDIRECT_URL = '/'
114 # Internationalization
115 # https://docs.djangoproject.com/en/1.11/topics/i18n/
117 LANGUAGE_CODE = 'fr-be'
119 TIME_ZONE = 'Europe/Brussels'
127 LOCALE_PATHS = (os.path.join(BASE_DIR, 'chloro', 'locale'),)
129 # Static files (CSS, JavaScript, Images)
130 # https://docs.djangoproject.com/en/1.11/howto/static-files/
131 STATIC_ROOT = os.path.join(BASE_DIR, 'collected-static')
132 STATIC_URL = '/static/'
133 STATICFILES_FINDERS = list(global_settings.STATICFILES_FINDERS) + ['gadjo.finders.XStaticFinder']
136 MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
137 MEDIA_URL = '/media/'
140 CKEDITOR_UPLOAD_PATH = 'uploads/'
141 CKEDITOR_IMAGE_BACKEND = 'pillow'
145 'allowedContent': True,
146 'removePlugins': 'stylesheetparser',
148 ['Source', 'Format', '-', 'Bold', 'Italic'],
149 ['NumberedList', 'BulletedList'],
150 ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
152 ['Image', '-', 'HorizontalRule'],
159 'resize_enabled': False,
164 SITE_AUTHOR = 'Frédéric Péters'
165 SITE_TITLE = 'Coin web de Frédéric Péters'
167 local_settings_file = os.environ.get(
168 'CHLORO_SETTINGS_FILE', os.path.join(os.path.dirname(__file__), 'local_settings.py')
170 if os.path.exists(local_settings_file):
171 exec(open(local_settings_file).read())