Add initial Django project

This commit is contained in:
Joakim Hellsén 2026-04-23 06:04:47 +02:00
commit fa6af127c1
Signed by: Joakim Hellsén
SSH key fingerprint: SHA256:/9h/CsExpFp+PRhsfA0xznFx2CGfTT5R/kpuFfUgEQk
15 changed files with 1103 additions and 4 deletions

32
config/urls.py Normal file
View file

@ -0,0 +1,32 @@
from typing import TYPE_CHECKING
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include
from django.urls import path
if TYPE_CHECKING:
from django.urls import URLPattern
from django.urls.resolvers import URLResolver
urlpatterns: list[URLPattern | URLResolver] = [
path(route="admin/", view=admin.site.urls),
]
if settings.DEBUG:
# Serve static files during development
urlpatterns += static(
prefix=settings.STATIC_URL,
document_root=settings.STATIC_ROOT,
)
urlpatterns += [
path(
route="__debug__/",
view=include(arg="debug_toolbar.urls"),
),
path(
route="__reload__/",
view=include(arg="django_browser_reload.urls"),
),
]