phase2: add modular apps, auth scaffolding, and base template routing

This commit is contained in:
Alfredo Di Stasio
2026-03-10 10:27:40 +01:00
parent 35686bdb66
commit f47ffe6c15
63 changed files with 594 additions and 24 deletions

View File

@ -19,7 +19,9 @@ def env_list(key: str, default: str = "") -> list[str]:
SECRET_KEY = os.getenv("DJANGO_SECRET_KEY", "insecure-development-secret")
DEBUG = env_bool("DJANGO_DEBUG", False)
ALLOWED_HOSTS = env_list("DJANGO_ALLOWED_HOSTS", "localhost,127.0.0.1")
CSRF_TRUSTED_ORIGINS = env_list("DJANGO_CSRF_TRUSTED_ORIGINS", "http://localhost,http://127.0.0.1")
CSRF_TRUSTED_ORIGINS = env_list(
"DJANGO_CSRF_TRUSTED_ORIGINS", "http://localhost,http://127.0.0.1"
)
INSTALLED_APPS = [
"django.contrib.admin",
@ -29,6 +31,14 @@ INSTALLED_APPS = [
"django.contrib.messages",
"django.contrib.staticfiles",
"apps.core",
"apps.users",
"apps.players",
"apps.competitions",
"apps.teams",
"apps.stats",
"apps.scouting",
"apps.providers",
"apps.ingestion",
]
MIDDLEWARE = [
@ -86,11 +96,17 @@ USE_TZ = True
STATIC_URL = "/static/"
STATIC_ROOT = BASE_DIR / "staticfiles"
STATICFILES_DIRS = [BASE_DIR / "static"]
MEDIA_URL = "/media/"
MEDIA_ROOT = BASE_DIR / "media"
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
LOGIN_URL = "users:login"
LOGIN_REDIRECT_URL = "core:dashboard"
LOGOUT_REDIRECT_URL = "core:home"
CELERY_BROKER_URL = os.getenv("CELERY_BROKER_URL", "redis://redis:6379/0")
CELERY_RESULT_BACKEND = os.getenv("CELERY_RESULT_BACKEND", "redis://redis:6379/0")
CELERY_ACCEPT_CONTENT = ["json"]

View File

@ -4,4 +4,12 @@ from django.urls import include, path
urlpatterns = [
path("admin/", admin.site.urls),
path("", include("apps.core.urls")),
path("users/", include("apps.users.urls")),
path("players/", include("apps.players.urls")),
path("competitions/", include("apps.competitions.urls")),
path("teams/", include("apps.teams.urls")),
path("stats/", include("apps.stats.urls")),
path("scouting/", include("apps.scouting.urls")),
path("providers/", include("apps.providers.urls")),
path("ingestion/", include("apps.ingestion.urls")),
]