2 Django settings for earwig project.
4 For more information on this file, see
5 https://docs.djangoproject.com/en/1.11/topics/settings/
7 For the full list of settings and their values, see
8 https://docs.djangoproject.com/en/1.11/ref/settings/
12 from django.conf import global_settings
14 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
15 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
18 # Quick-start development settings - unsuitable for production
19 # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
21 # SECURITY WARNING: keep the secret key used in production secret!
22 SECRET_KEY = 'tlr6=af(#1hrb&@s)gwesw=-%#fh^3msr9y&*qmf+se_x-o-7t'
24 # SECURITY WARNING: don't run with debug turned on in production!
30 # Application definition
33 'django.contrib.admin',
35 'django.contrib.auth',
36 'django.contrib.contenttypes',
37 'django.contrib.sessions',
38 'django.contrib.messages',
39 'django.contrib.staticfiles',
47 'django.middleware.security.SecurityMiddleware',
48 'django.contrib.sessions.middleware.SessionMiddleware',
49 'django.middleware.common.CommonMiddleware',
50 'django.middleware.csrf.CsrfViewMiddleware',
51 'django.contrib.auth.middleware.AuthenticationMiddleware',
52 'django.contrib.messages.middleware.MessageMiddleware',
53 'django.middleware.clickjacking.XFrameOptionsMiddleware',
56 # Serve xstatic files, required for gadjo
57 STATICFILES_FINDERS = list(global_settings.STATICFILES_FINDERS) + \
58 ['gadjo.finders.XStaticFinder']
60 ROOT_URLCONF = 'earwig.urls'
64 'BACKEND': 'django.template.backends.django.DjangoTemplates',
66 os.path.join(BASE_DIR, 'earwig', 'templates'),
70 'context_processors': [
71 'django.template.context_processors.debug',
72 'django.template.context_processors.request',
73 'django.contrib.auth.context_processors.auth',
74 'django.contrib.messages.context_processors.messages',
80 WSGI_APPLICATION = 'earwig.wsgi.application'
82 AUTH_USER_MODEL = 'users.User'
85 # https://docs.djangoproject.com/en/1.11/ref/settings/#databases
89 'ENGINE': 'django.db.backends.sqlite3',
90 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
96 # https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators
98 AUTH_PASSWORD_VALIDATORS = [
100 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
103 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
106 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
109 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
114 # Internationalization
115 # https://docs.djangoproject.com/en/1.11/topics/i18n/
117 LANGUAGE_CODE = 'en-us'
119 TIME_ZONE = 'Europe/Brussels'
128 # Static files (CSS, JavaScript, Images)
129 # https://docs.djangoproject.com/en/1.11/howto/static-files/
131 STATIC_URL = '/static/'
134 LOGIN_REDIRECT_URL = '/'
137 local_settings_file = os.environ.get('EARWIG_SETTINGS_FILE',
138 os.path.join(os.path.dirname(__file__), 'local_settings.py'))
139 if os.path.exists(local_settings_file):
140 exec(open(local_settings_file).read())