Files
oximg/app/api/urls.py
2025-08-31 00:29:53 +02:00

21 lines
549 B
Python

from django.urls import path, include
from rest_framework.authtoken import views
from .routers import router
from .autoload import load_viewset_registries
load_viewset_registries(router)
app_name = 'api'
urlpatterns = [
# Endpoints d'API REST
path('', include(router.urls)),
# Endpoint d'authentification par token
path('auth-token/', views.obtain_auth_token, name='api-token-auth'),
# Endpoints d'authentification de l'API browsable
path('auth/', include('rest_framework.urls', namespace='rest_framework')),
]