37 lines
1.4 KiB
Python
37 lines
1.4 KiB
Python
"""
|
|
URL configuration for hamprint project.
|
|
|
|
The `urlpatterns` list routes URLs to views. For more information please see:
|
|
https://docs.djangoproject.com/en/6.0/topics/http/urls/
|
|
Examples:
|
|
Function views
|
|
1. Add an import: from my_app import views
|
|
2. Add a URL to urlpatterns: path('', views.home, name='home')
|
|
Class-based views
|
|
1. Add an import: from other_app.views import Home
|
|
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
|
|
Including another URLconf
|
|
1. Import the include() function: from django.urls import include, path
|
|
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
|
"""
|
|
|
|
from django.contrib import admin
|
|
from django.urls import include, path
|
|
|
|
from apps.submissions.views import serve_stl
|
|
|
|
urlpatterns = [
|
|
path("admin/", admin.site.urls),
|
|
# Our local /accounts/ routes (close-account, etc.) come BEFORE allauth's
|
|
# include so they win on URL match. Everything we don't claim falls
|
|
# through to allauth.
|
|
path("accounts/", include("apps.accounts.urls")),
|
|
path("accounts/", include("allauth.urls")),
|
|
# Auth-checked media serve. Lives here (not in apps.submissions.urls)
|
|
# because the prefix is MEDIA_URL, not /submit/. WhiteNoise serves
|
|
# /static/ only, so this is the sole handler for /media/.
|
|
path("media/<path:path>", serve_stl, name="serve_stl"),
|
|
path("", include("apps.dashboard.urls")),
|
|
path("submit/", include("apps.submissions.urls")),
|
|
]
|