feat: serve isolated companies below a fixed product path
All checks were successful
Application acceptance / application-tests (push) Successful in 1m12s
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s
Build and Publish Container Image / build-and-push (push) Successful in 25s

Assistant: codex
Assistant-Model: gpt-6-astra
Assistant-Session: 01a07ff8-19d0-7820-b4d0-1353833cb7fc
This commit is contained in:
tegwick 2026-09-11 21:29:26 +02:00
parent 09e2239bc6
commit 9345a1bb1a
28 changed files with 350 additions and 117 deletions

View file

@ -3,6 +3,8 @@ from pathlib import Path
import dj_database_url
from decouple import config
from .paths import application_path
BASE_DIR = Path(__file__).resolve().parent.parent.parent
SECRET_KEY = config('SECRET_KEY', default='django-insecure-change-me')
@ -69,9 +71,20 @@ DATABASES = {
AUTH_USER_MODEL = 'accounts.Mitarbeiter'
LOGIN_URL = 'accounts:login'
LOGIN_REDIRECT_URL = '/'
LOGIN_REDIRECT_URL = 'home'
LOGOUT_REDIRECT_URL = 'accounts:login'
# The edge strips this exact prefix before forwarding to this isolated instance.
# Django uses SCRIPT_NAME for URL generation; tenant selection stays with the
# admitted deployment/database binding, not arbitrary forwarded headers.
APP_BASE_PATH = application_path(config('APP_BASE_PATH', default=''))
FORCE_SCRIPT_NAME = APP_BASE_PATH or None
SESSION_COOKIE_PATH = CSRF_COOKIE_PATH = APP_BASE_PATH + '/'
if APP_BASE_PATH:
_cookie_prefix = 'vergabe_' + APP_BASE_PATH[1:].replace('-', '_')
SESSION_COOKIE_NAME = _cookie_prefix + '_sessionid'
CSRF_COOKIE_NAME = _cookie_prefix + '_csrftoken'
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
AUTH_PASSWORD_VALIDATORS = [
@ -86,11 +99,11 @@ TIME_ZONE = 'Europe/Berlin'
USE_I18N = True
USE_TZ = True
STATIC_URL = '/static/'
STATIC_URL = APP_BASE_PATH + '/static/'
STATIC_ROOT = BASE_DIR / 'staticfiles'
STATICFILES_DIRS = [BASE_DIR / 'static']
MEDIA_URL = '/media/'
MEDIA_URL = APP_BASE_PATH + '/media/'
MEDIA_ROOT = BASE_DIR / 'media'
MAX_UPLOAD_SIZE = config('MAX_UPLOAD_SIZE', default=52428800, cast=int)