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
37 'django.contrib.auth',
38 'django.contrib.contenttypes',
39 'django.contrib.sessions',
40 'django.contrib.messages',
41 'django.contrib.staticfiles',
49 'django.middleware.security.SecurityMiddleware',
50 'django.contrib.sessions.middleware.SessionMiddleware',
51 'django.middleware.common.CommonMiddleware',
52 'django.middleware.csrf.CsrfViewMiddleware',
53 'django.contrib.auth.middleware.AuthenticationMiddleware',
54 'django.contrib.messages.middleware.MessageMiddleware',
55 'django.middleware.clickjacking.XFrameOptionsMiddleware',
58 ROOT_URLCONF = 'chloro.urls'
62 'BACKEND': 'django.template.backends.django.DjangoTemplates',
66 'context_processors': [
67 'django.template.context_processors.debug',
68 'django.template.context_processors.request',
69 'django.contrib.auth.context_processors.auth',
70 'django.contrib.messages.context_processors.messages',
76 WSGI_APPLICATION = 'chloro.wsgi.application'
80 # https://docs.djangoproject.com/en/1.11/ref/settings/#databases
83 'default': {'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'chloro',},
88 # https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators
90 AUTH_PASSWORD_VALIDATORS = [
91 {'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',},
92 {'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',},
93 {'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',},
94 {'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',},
97 LOGIN_REDIRECT_URL = '/'
100 # Internationalization
101 # https://docs.djangoproject.com/en/1.11/topics/i18n/
103 LANGUAGE_CODE = 'fr-be'
105 TIME_ZONE = 'Europe/Brussels'
114 # Static files (CSS, JavaScript, Images)
115 # https://docs.djangoproject.com/en/1.11/howto/static-files/
116 STATIC_ROOT = os.path.join(BASE_DIR, 'collected-static')
117 STATIC_URL = '/static/'
118 STATICFILES_FINDERS = list(global_settings.STATICFILES_FINDERS) + ['gadjo.finders.XStaticFinder']
121 MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
122 MEDIA_URL = '/media/'
125 CKEDITOR_UPLOAD_PATH = 'uploads/'
126 CKEDITOR_IMAGE_BACKEND = 'pillow'
130 'allowedContent': True,
131 'removePlugins': 'stylesheetparser',
133 ['Source', 'Format', '-', 'Bold', 'Italic'],
134 ['NumberedList', 'BulletedList'],
135 ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
137 ['Image', '-', 'HorizontalRule'],
142 'resize_enabled': False,
147 local_settings_file = os.environ.get(
148 'CHLORO_SETTINGS_FILE', os.path.join(os.path.dirname(__file__), 'local_settings.py')
150 if os.path.exists(local_settings_file):
151 exec(open(local_settings_file).read())