30 lines
973 B
Python
30 lines
973 B
Python
from django.urls import path, re_path, include
|
|
from .views import (
|
|
GeoProxyView,
|
|
InterventionListCreateView,
|
|
InterventionRetrieveUpdateDestroyView,
|
|
IssueJWTView,
|
|
SharePATView,
|
|
)
|
|
|
|
app_name = "zapi"
|
|
|
|
urlpatterns = [
|
|
# API root (optionnel: une vue d'info/health)
|
|
# path("", APIRootView.as_view(), name="root"),
|
|
|
|
# ---- Assets -> proxy pygeoapi ----
|
|
# /api/geo/... (catch-all)
|
|
re_path(r"^geo/.*$", GeoProxyView.as_view(), name="geo-proxy"),
|
|
|
|
# ---- Interventions (DRF) ----
|
|
path("interventions/", InterventionListCreateView.as_view(), name="intervention-list"),
|
|
path("interventions/<int:pk>/", InterventionRetrieveUpdateDestroyView.as_view(), name="intervention-detail"),
|
|
|
|
# ---- Reporting ----
|
|
path("reporting/", include("reporting.urls")),
|
|
|
|
# ---- Tokens utilitaires ----
|
|
path("tokens/jwt/", IssueJWTView.as_view(), name="issue-jwt"),
|
|
path("tokens/share/", SharePATView.as_view(), name="share-pat"),
|
|
]
|