All checks were successful
Build containers when image tags change / build-if-image-changed (., web, containers, main container, git.baumann.gr/adebaumann/vui) (push) Successful in 15s
Build containers when image tags change / build-if-image-changed (data-loader, loader, initContainers, init-container, git.baumann.gr/adebaumann/vui-data-loader) (push) Successful in 4s
SonarQube Scan / SonarQube Trigger (push) Successful in 47s
- Add new "alle-kommentare" (all comments) view for staff users only - Allows staff to view and manage all user comments across the system - Grouped by document with user information displayed - Staff can delete any comment via the dedicated delete button - Restricts access via user_passes_test decorator - Create all_comments.html template - Based on user_comments template with added username field - Shows comment author, creation time, and edit time - Provides delete functionality for comment management - Update navigation menu - Add "Alle Kommentare" link in user dropdown menu - Link only visible to staff members - Add URL route for alle-kommentare page - Path: /dokumente/alle-kommentare/ - URL name: all_comments - Bump application versions - Update footer version from 0.965 to 0.966 - Update K8s deployment version from 0.917 to 0.918 - ArgoCD deployment already at 0.966 All existing tests pass (148 tests total)
164 lines
4.1 KiB
Python
164 lines
4.1 KiB
Python
"""
|
|
Django settings for VorgabenUI 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 = '429ti9tugj9güLLO))(G&G94KF452R3Fieaek$&6s#zlao-ca!#)_@j6*u+8s&bvfil^qyo%&-sov$ysi'
|
|
|
|
# SECURITY WARNING: don't run with debug turned on in production!
|
|
DEBUG = True
|
|
|
|
ALLOWED_HOSTS = ["10.128.128.144","localhost","127.0.0.1","*"]
|
|
|
|
# Application definition
|
|
|
|
INSTALLED_APPS = [
|
|
'django.contrib.admin',
|
|
'django.contrib.auth',
|
|
'django.contrib.contenttypes',
|
|
'django.contrib.sessions',
|
|
'django.contrib.messages',
|
|
'django.contrib.staticfiles',
|
|
'dokumente',
|
|
'abschnitte',
|
|
'stichworte',
|
|
'referenzen',
|
|
'rollen',
|
|
'mptt',
|
|
'pages',
|
|
'nested_admin',
|
|
]
|
|
|
|
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',
|
|
]
|
|
|
|
INTERNAL_IPS = [ "127.0.0.1","10.128.128.130"]
|
|
|
|
ROOT_URLCONF = 'VorgabenUI.urls'
|
|
|
|
TEMPLATES = [
|
|
{
|
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
|
'DIRS': [],
|
|
'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 = 'VorgabenUI.wsgi.application'
|
|
|
|
CSRF_TRUSTED_ORIGINS=["https://vorgabenportal.knowyoursecurity.com"]
|
|
|
|
# Database
|
|
# https://docs.djangoproject.com/en/5.2/ref/settings/#databases
|
|
|
|
DATABASES = {
|
|
'default': {
|
|
'ENGINE': 'django.db.backends.sqlite3',
|
|
'NAME': BASE_DIR / 'data/db.sqlite3',
|
|
}
|
|
}
|
|
|
|
|
|
# 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-ch'
|
|
|
|
TIME_ZONE = 'UTC'
|
|
|
|
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="/home/adebaumann/VorgabenUI/staticfiles/"
|
|
STATIC_ROOT="staticfiles/"
|
|
STATICFILES_DIRS= (
|
|
os.path.join(BASE_DIR,"static"),
|
|
)
|
|
|
|
# Media files (User-uploaded content)
|
|
MEDIA_URL = '/media/'
|
|
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
|
|
|
# Diagram cache settings
|
|
DIAGRAM_CACHE_DIR = 'diagram_cache' # relative to MEDIA_ROOT
|
|
|
|
# Default primary key field type
|
|
# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field
|
|
|
|
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
|
DATA_UPLOAD_MAX_NUMBER_FIELDS=10250
|
|
NESTED_ADMIN_LAZY_INLINES = True
|
|
|
|
# Authentication settings
|
|
LOGIN_URL = 'login'
|
|
LOGIN_REDIRECT_URL = '/'
|
|
LOGOUT_REDIRECT_URL = 'login'
|
|
|
|
#LOGGING = {
|
|
# "version": 1,
|
|
# "handlers" :{
|
|
# "file": {
|
|
# "class": "logging.FileHandler",
|
|
# "filename": "general.log",
|
|
# "level": "DEBUG",
|
|
# },
|
|
# },
|
|
#}
|