2026-05-18 17:27:59 +08:00
|
|
|
"""
|
|
|
|
|
URL configuration for config project.
|
|
|
|
|
"""
|
|
|
|
|
from django.contrib import admin
|
|
|
|
|
from django.urls import path, include
|
|
|
|
|
from django.conf import settings
|
|
|
|
|
from django.conf.urls.static import static
|
|
|
|
|
|
|
|
|
|
from rest_framework_simplejwt.views import (
|
|
|
|
|
TokenObtainPairView,
|
|
|
|
|
TokenRefreshView,
|
|
|
|
|
)
|
|
|
|
|
|
2026-05-19 10:33:35 +08:00
|
|
|
from device_management.views import home_page
|
|
|
|
|
|
2026-05-18 17:27:59 +08:00
|
|
|
urlpatterns = [
|
2026-05-19 10:33:35 +08:00
|
|
|
path('', home_page, name='home'),
|
2026-05-18 17:27:59 +08:00
|
|
|
path('admin/', admin.site.urls),
|
|
|
|
|
path('api/', include('device_management.urls')),
|
|
|
|
|
path('api/token/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
|
|
|
|
|
path('api/token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
|
|
|
|
|
path('api-auth/', include('rest_framework.urls')),
|
|
|
|
|
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|