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',
46 'django.middleware.security.SecurityMiddleware',
47 'django.contrib.sessions.middleware.SessionMiddleware',
48 'django.middleware.common.CommonMiddleware',
49 'django.middleware.csrf.CsrfViewMiddleware',
50 'django.contrib.auth.middleware.AuthenticationMiddleware',
51 'django.contrib.messages.middleware.MessageMiddleware',
52 'django.middleware.clickjacking.XFrameOptionsMiddleware',
55 # Serve xstatic files, required for gadjo
56 STATICFILES_FINDERS = list(global_settings.STATICFILES_FINDERS) + \
57 ['gadjo.finders.XStaticFinder']
59 ROOT_URLCONF = 'earwig.urls'
63 'BACKEND': 'django.template.backends.django.DjangoTemplates',
65 os.path.join(BASE_DIR, 'earwig', 'templates'),
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 = 'earwig.wsgi.application'
81 AUTH_USER_MODEL = 'users.User'
84 # https://docs.djangoproject.com/en/1.11/ref/settings/#databases
88 'ENGINE': 'django.db.backends.sqlite3',
89 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
95 # https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators
97 AUTH_PASSWORD_VALIDATORS = [
99 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
102 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
105 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
108 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
113 # Internationalization
114 # https://docs.djangoproject.com/en/1.11/topics/i18n/
116 LANGUAGE_CODE = 'en-us'
118 TIME_ZONE = 'Europe/Brussels'
127 # Static files (CSS, JavaScript, Images)
128 # https://docs.djangoproject.com/en/1.11/howto/static-files/
130 STATIC_URL = '/static/'
133 LOGIN_REDIRECT_URL = '/'
136 local_settings_file = os.environ.get('EARWIG_SETTINGS_FILE',
137 os.path.join(os.path.dirname(__file__), 'local_settings.py'))
138 if os.path.exists(local_settings_file):
139 exec(open(local_settings_file).read())