39 lines
1.2 KiB
Python
39 lines
1.2 KiB
Python
"""generated with djinit"""
|
|
|
|
from django.contrib import admin
|
|
from django.urls import path, include
|
|
from django.conf import settings
|
|
from drf_spectacular.views import (
|
|
SpectacularAPIView,
|
|
SpectacularSwaggerView,
|
|
)
|
|
from rest_framework_simplejwt.views import (
|
|
TokenObtainPairView,
|
|
TokenRefreshView,
|
|
TokenBlacklistView,
|
|
)
|
|
|
|
urlpatterns = [
|
|
path("admin/", admin.site.urls),
|
|
# JWT tokens
|
|
path("token/", TokenObtainPairView.as_view(), name="token_obtain_pair"),
|
|
path("token/refresh/", TokenRefreshView.as_view(), name="token_refresh"),
|
|
path("token/blacklist/", TokenBlacklistView.as_view(), name="token_blacklist"),
|
|
# App URLs
|
|
path("", include("apps.clients.urls")),
|
|
path("", include("apps.core.urls")),
|
|
path("", include("apps.finance.urls")),
|
|
path("", include("apps.productivity.urls")),
|
|
path("", include("apps.services.urls")),
|
|
path("", include("apps.core.urls")),
|
|
path("", include("apps.notifications.urls")),
|
|
path("", include("apps.projects.urls")),
|
|
]
|
|
|
|
# Don't show schema in production
|
|
if settings.DEBUG:
|
|
urlpatterns += [
|
|
path("schema/", SpectacularAPIView.as_view(), name="schema"),
|
|
path("docs/", SpectacularSwaggerView.as_view(url_name="schema")),
|
|
]
|