init
This commit is contained in:
20
app/api/urls.py
Normal file
20
app/api/urls.py
Normal file
@@ -0,0 +1,20 @@
|
||||
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')),
|
||||
]
|
||||
Reference in New Issue
Block a user