update module

This commit is contained in:
Jonas Heinrich 2025-08-21 10:49:18 +02:00
parent 08bf161f09
commit d465101913
2 changed files with 11 additions and 8 deletions

View file

@ -36,12 +36,8 @@
# Django manage helper
install -Dm755 ${./manage.py} $out/bin/fragdenrat-manage
# Templates and static assets
if [ -d ./templates ]; then
cp -r ./templates $out/share/fragdenrat/
fi
if [ -d ./assets ]; then
cp -r ./assets $out/share/fragdenrat/
fi
cp -r ./templates $out/share/fragdenrat/
cp -r ./assets $out/share/fragdenrat/
'';
passthru.pythonPath = python3Packages.makePythonPath dependencies;

View file

@ -2,6 +2,7 @@ from pathlib import Path
import os
BASE_DIR = Path(__file__).resolve().parent.parent
PROJECT_DIR = Path(__file__).resolve().parent
DATA_DIR = Path(os.environ.get("FRAGDENRAT_DATA_DIR", str(BASE_DIR)))
SECRET_KEY = os.environ.get("SECRET_KEY", "dev-secret-key-change-me")
@ -33,7 +34,10 @@ ROOT_URLCONF = "fragdenrat.urls"
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [BASE_DIR / "templates"],
"DIRS": [
BASE_DIR / "templates",
PROJECT_DIR / "templates",
],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
@ -61,6 +65,9 @@ USE_I18N = True
USE_TZ = True
STATIC_URL = "/static/"
STATICFILES_DIRS = [BASE_DIR / "assets"]
STATICFILES_DIRS = [
BASE_DIR / "assets",
PROJECT_DIR / "assets",
]
STATIC_ROOT = DATA_DIR / "staticfiles"
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"