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.
184 lines
4.8 KiB
184 lines
4.8 KiB
"""
|
|
Django settings for crewpulse project.
|
|
|
|
Generated by 'django-admin startproject' using Django 5.1.6.
|
|
|
|
For more information on this file, see
|
|
https://docs.djangoproject.com/en/5.1/topics/settings/
|
|
|
|
For the full list of settings and their values, see
|
|
https://docs.djangoproject.com/en/5.1/ref/settings/
|
|
"""
|
|
|
|
from pathlib import Path
|
|
from import_export.formats.base_formats import CSV
|
|
|
|
IMPORT_FORMATS = [CSV]
|
|
EXPORT_FORMATS = [CSV]
|
|
|
|
# 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.1/howto/deployment/checklist/
|
|
|
|
# SECURITY WARNING: keep the secret key used in production secret!
|
|
SECRET_KEY = 'django-insecure-0$kqaql9qn*^##h(7l^ic$nf^lyc^#8#hcpk(_3l8h!%r+er3a'
|
|
|
|
# SECURITY WARNING: don't run with debug turned on in production!
|
|
DEBUG = True
|
|
|
|
ALLOWED_HOSTS = ["10.0.4.181", "cp.samuelzielke.de", "127.0.0.1", "localhost"]
|
|
CSRF_TRUSTED_ORIGINS = ["https://cp.samuelzielke.de"]
|
|
|
|
|
|
# Application definition
|
|
|
|
INSTALLED_APPS = [
|
|
#ADD_ONs
|
|
'jazzmin',
|
|
'phonenumber_field',
|
|
'import_export',
|
|
|
|
#Defaul
|
|
'django.contrib.admin',
|
|
'django.contrib.auth',
|
|
'django.contrib.contenttypes',
|
|
'django.contrib.sessions',
|
|
'django.contrib.messages',
|
|
'django.contrib.staticfiles',
|
|
|
|
# My Apps
|
|
'main',
|
|
]
|
|
|
|
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',
|
|
]
|
|
|
|
ROOT_URLCONF = 'crewpulse.urls'
|
|
|
|
TEMPLATES = [
|
|
{
|
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
|
'DIRS': [],
|
|
'APP_DIRS': True,
|
|
'OPTIONS': {
|
|
'context_processors': [
|
|
'django.template.context_processors.debug',
|
|
'django.template.context_processors.request',
|
|
'django.contrib.auth.context_processors.auth',
|
|
'django.contrib.messages.context_processors.messages',
|
|
],
|
|
},
|
|
},
|
|
]
|
|
|
|
WSGI_APPLICATION = 'crewpulse.wsgi.application'
|
|
|
|
|
|
# Database
|
|
# https://docs.djangoproject.com/en/5.1/ref/settings/#databases
|
|
|
|
DATABASES = {
|
|
'default': {
|
|
'ENGINE': 'django.db.backends.sqlite3',
|
|
'NAME': BASE_DIR / 'db.sqlite3',
|
|
}
|
|
}
|
|
|
|
|
|
# Password validation
|
|
# https://docs.djangoproject.com/en/5.1/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.1/topics/i18n/
|
|
|
|
LANGUAGE_CODE = 'en-us'
|
|
|
|
TIME_ZONE = 'UTC'
|
|
|
|
USE_I18N = True
|
|
|
|
USE_TZ = True
|
|
|
|
|
|
# Static files (CSS, JavaScript, Images)
|
|
# https://docs.djangoproject.com/en/5.1/howto/static-files/
|
|
|
|
STATIC_URL = 'static/'
|
|
STATIC_ROOT = '/var/www/crewpulse/static/'
|
|
|
|
# Default primary key field type
|
|
# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field
|
|
|
|
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
|
|
|
# Settings for AdminPage
|
|
# https://django-jazzmin.readthedocs.io/configuration/
|
|
JAZZMIN_SETTINGS = {
|
|
"site_title": "CrewPulse Admin",
|
|
"site_brand": "CrewPulse",
|
|
"site_header": "Mein Admin",
|
|
"welcome_sign": "CrewPulse Admin Login",
|
|
"copyright": " Samuel Zielke",
|
|
"site_logo": 'main/img/crewpulse_logo.png',
|
|
"show_ui_builder": True, # Zeigt den UI-Builder im Admin-Bereich
|
|
}
|
|
|
|
JAZZMIN_UI_TWEAKS = {
|
|
"navbar_small_text": False,
|
|
"footer_small_text": False,
|
|
"body_small_text": True,
|
|
"brand_small_text": False,
|
|
"brand_colour": False,
|
|
"accent": "accent-warning",
|
|
"navbar": "navbar-dark",
|
|
"no_navbar_border": False,
|
|
"navbar_fixed": False,
|
|
"layout_boxed": False,
|
|
"footer_fixed": False,
|
|
"sidebar_fixed": False,
|
|
"sidebar": "sidebar-dark-olive",
|
|
"sidebar_nav_small_text": False,
|
|
"sidebar_disable_expand": False,
|
|
"sidebar_nav_child_indent": False,
|
|
"sidebar_nav_compact_style": False,
|
|
"sidebar_nav_legacy_style": False,
|
|
"sidebar_nav_flat_style": False,
|
|
"theme": "solar",
|
|
"dark_mode_theme": "solar",
|
|
"button_classes": {
|
|
"primary": "btn-primary",
|
|
"secondary": "btn-secondary",
|
|
"info": "btn-info",
|
|
"warning": "btn-warning",
|
|
"danger": "btn-danger",
|
|
"success": "btn-success"
|
|
},
|
|
"actions_sticky_top": False
|
|
}
|