You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
173 lines
4.3 KiB
173 lines
4.3 KiB
"""
|
|
Django settings for feo_homepage project.
|
|
|
|
Generated by 'django-admin startproject' using Django 5.2.
|
|
|
|
For more information on this file, see
|
|
https://docs.djangoproject.com/en/5.2/topics/settings/
|
|
|
|
For the full list of settings and their values, see
|
|
https://docs.djangoproject.com/en/5.2/ref/settings/
|
|
"""
|
|
|
|
import os
|
|
from pathlib import Path
|
|
|
|
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
|
BASE_DIR = Path(__file__).resolve().parent.parent
|
|
|
|
|
|
# Quick-start development settings - unsuitable for production
|
|
# See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/
|
|
|
|
# SECURITY WARNING: keep the secret key used in production secret!
|
|
SECRET_KEY = 'django-insecure-erzk)6pse_%2)7@5z+6fe=d^iheof@mg0=2zaqz)17_p9t#!%6'
|
|
|
|
# SECURITY WARNING: don't run with debug turned on in production!
|
|
DEBUG = True
|
|
|
|
ALLOWED_HOSTS = []
|
|
|
|
|
|
# Application definition
|
|
|
|
INSTALLED_APPS = [
|
|
'django.contrib.admin',
|
|
'django.contrib.auth',
|
|
'django.contrib.contenttypes',
|
|
'django.contrib.sessions',
|
|
'django.contrib.messages',
|
|
'django.contrib.staticfiles',
|
|
|
|
'wagtail.contrib.forms',
|
|
'wagtail.contrib.redirects',
|
|
'wagtail.embeds',
|
|
'wagtail.sites',
|
|
'wagtail.users',
|
|
'wagtail.snippets',
|
|
'wagtail.documents',
|
|
'wagtail.images',
|
|
'wagtail.search',
|
|
'wagtail.admin',
|
|
'wagtail',
|
|
'wagtailmedia',
|
|
|
|
'wagtailcaptcha',
|
|
'modelcluster',
|
|
'taggit',
|
|
'django_extensions',
|
|
'crispy_forms',
|
|
|
|
'core',
|
|
]
|
|
|
|
MIDDLEWARE = [
|
|
'django.middleware.security.SecurityMiddleware',
|
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
|
'django.middleware.common.CommonMiddleware',
|
|
'django.middleware.csrf.CsrfViewMiddleware',
|
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
|
'django.contrib.messages.middleware.MessageMiddleware',
|
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
|
|
|
'wagtail.contrib.redirects.middleware.RedirectMiddleware',
|
|
]
|
|
|
|
ROOT_URLCONF = 'feo_homepage.urls'
|
|
|
|
TEMPLATES = [
|
|
{
|
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
|
'DIRS': [BASE_DIR / 'templates']
|
|
,
|
|
'APP_DIRS': True,
|
|
'OPTIONS': {
|
|
'context_processors': [
|
|
'django.template.context_processors.request',
|
|
'django.contrib.auth.context_processors.auth',
|
|
'django.contrib.messages.context_processors.messages',
|
|
],
|
|
},
|
|
},
|
|
]
|
|
|
|
WSGI_APPLICATION = 'feo_homepage.wsgi.application'
|
|
|
|
|
|
# Database
|
|
# https://docs.djangoproject.com/en/5.2/ref/settings/#databases
|
|
|
|
DATABASES = {
|
|
'default': {
|
|
'ENGINE': 'django.db.backends.postgresql',
|
|
'NAME': os.environ['DB_NAME'],
|
|
'HOST': os.environ['DB_HOST'],
|
|
'USER': os.environ['DB_USER'],
|
|
'PASSWORD': os.environ['DB_PASS'],
|
|
}
|
|
}
|
|
|
|
|
|
# Password validation
|
|
# https://docs.djangoproject.com/en/5.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',
|
|
# },
|
|
]
|
|
|
|
|
|
# Internationalization
|
|
# https://docs.djangoproject.com/en/5.2/topics/i18n/
|
|
|
|
LANGUAGE_CODE = 'de-de'
|
|
|
|
TIME_ZONE = 'Europe/Berlin'
|
|
|
|
USE_I18N = True
|
|
|
|
USE_TZ = True
|
|
|
|
|
|
# Static files (CSS, JavaScript, Images)
|
|
# https://docs.djangoproject.com/en/5.2/howto/static-files/
|
|
|
|
STATIC_URL = 'static/'
|
|
STATIC_ROOT = '/app/static'
|
|
|
|
MEDIA_URL = '/media/'
|
|
MEDIA_ROOT = '/app/media'
|
|
|
|
# Default primary key field type
|
|
# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field
|
|
|
|
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
|
|
|
# Wagtail settings
|
|
WAGTAIL_SITE_NAME = "FEO Homepage"
|
|
|
|
# Search
|
|
WAGTAILSEARCH_BACKENDS = {
|
|
'default': {
|
|
'BACKEND': 'wagtail.search.backends.database',
|
|
}
|
|
}
|
|
|
|
# Base URL to use when referring to full URLs within the Wagtail admin backend
|
|
WAGTAILADMIN_BASE_URL = 'http://localhost:8000'
|
|
|
|
CRISPY_TEMPLATE_PACK = 'bootstrap3'
|
|
|
|
RECAPTCHA_PUBLIC_KEY = '6Lfa2XAUAAAAAKaTdzFBc4zrN8YxrsW9kUpWjkom'
|
|
RECAPTCHA_PRIVATE_KEY = '6Lfa2XAUAAAAAGPHGmkceJlPXm3iwXvlDQbXBC0s'
|
|
NOCAPTCHA = True
|
|
|