158 lines
3.6 KiB
Python
158 lines
3.6 KiB
Python
"""
|
|
Django settings for efundburo project.
|
|
|
|
Generated by 'django-admin startproject' using Django 2.2.3.
|
|
|
|
For more information on this file, see
|
|
https://docs.djangoproject.com/en/2.2/topics/settings/
|
|
|
|
For the full list of settings and their values, see
|
|
https://docs.djangoproject.com/en/2.2/ref/settings/
|
|
"""
|
|
|
|
import os
|
|
from .base import *
|
|
# SECURITY WARNING: don't run with debug turned on in production!
|
|
DEBUG = True
|
|
|
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
|
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.2/howto/deployment/checklist/
|
|
|
|
# SECURITY WARNING: keep the secret key used in production secret!
|
|
SECRET_KEY = 'su&@gb-wu8bji0(n(ps0-ko&g2crvur+$40*+)=gyo+t=kxih)'
|
|
|
|
ALLOWED_HOSTS = ['127.0.0.1', 'localhost']
|
|
|
|
# Application definition
|
|
|
|
ROOT_URLCONF = 'efundburo.urls'
|
|
|
|
TEMPLATES = [
|
|
{
|
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
|
'DIRS': [os.path.join(BASE_DIR, 'efundburo','templates')],
|
|
'APP_DIRS': True,
|
|
'OPTIONS': {
|
|
'context_processors': [
|
|
'django.template.context_processors.debug',
|
|
'django.template.context_processors.i18n',
|
|
'django.template.context_processors.request',
|
|
'django.contrib.auth.context_processors.auth',
|
|
'django.contrib.messages.context_processors.messages',
|
|
"cms.context_processors.site_mode",
|
|
],
|
|
},
|
|
},
|
|
]
|
|
|
|
WSGI_APPLICATION = 'efundburo.wsgi.application'
|
|
|
|
|
|
# Database
|
|
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases
|
|
|
|
DATABASES = {
|
|
'default': {
|
|
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
|
'NAME': 'app',
|
|
'USER': 'postgres'
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Password validation
|
|
# https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
|
|
|
|
AUTH_PASSWORD_VALIDATORS = [
|
|
{
|
|
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
|
},
|
|
{
|
|
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
|
},
|
|
{
|
|
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
|
},
|
|
{
|
|
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
|
},
|
|
]
|
|
|
|
|
|
CACHES = {
|
|
'default': {
|
|
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
|
|
'LOCATION': 'unique-snowflake',
|
|
}
|
|
}
|
|
|
|
|
|
# Internationalization
|
|
# https://docs.djangoproject.com/en/2.2/topics/i18n/
|
|
|
|
LANGUAGE_CODE = 'de-de'
|
|
|
|
TIME_ZONE = 'Europe/Zurich'
|
|
|
|
|
|
USE_TZ = True
|
|
|
|
LOCALE_PATHS = [
|
|
os.path.join(BASE_DIR, 'locale')
|
|
]
|
|
|
|
# Mail
|
|
|
|
EMAIL_HOST = 'ans00.89grad.ch'
|
|
EMAIL_HOST_PASSWORD = 'kraxIO1i5tY8LeZCXBLEWBYLp6pxptmZ'
|
|
EMAIL_HOST_USER = 'noreply@e-fundbuero.ch'
|
|
EMAIL_USE_TLS = True
|
|
|
|
ADMIN_EMAIL = "fundbuero@alpinesmuseum.ch"
|
|
|
|
# Static files (CSS, JavaScript, Images)
|
|
# https://docs.djangoproject.com/en/2.2/howto/static-files/
|
|
|
|
STATIC_URL = '/static/'
|
|
|
|
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
|
|
|
|
# WEBPACK ASSETS CONFIGURATION
|
|
|
|
STATICFILES_DIRS = (
|
|
# This lets Django's collectstatic store our bundles (bundled with webpack)
|
|
os.path.join(BASE_DIR, 'assets', 'staticfiles'),
|
|
)
|
|
|
|
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
|
MEDIA_URL = '/media/'
|
|
|
|
WEBPACK_LOADER = {
|
|
'DEFAULT': {
|
|
'BUNDLE_DIR_NAME': 'bundles/',
|
|
'STATS_FILE': os.path.join(BASE_DIR, 'webpack-stats.json'),
|
|
}
|
|
}
|
|
|
|
INTERNAL_IPS = [
|
|
'127.0.0.1',
|
|
]
|
|
|
|
|
|
WEBSITE_MODE = {
|
|
'127.0.0.1:8001': 'external',
|
|
'127.0.0.1:8000': 'internal'
|
|
}
|
|
|
|
|
|
SITE_ID = 1
|
|
|
|
from .cms import *
|