new models, frontend functions, public pages
This commit is contained in:
@@ -4,9 +4,11 @@ from .views import (
|
||||
RegisterView,
|
||||
UserProfileView,
|
||||
LinkViewSet,
|
||||
LinkGroupViewSet
|
||||
LinkGroupViewSet,
|
||||
PublicUserGroupsView
|
||||
)
|
||||
from rest_framework.routers import DefaultRouter
|
||||
from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView
|
||||
|
||||
router = DefaultRouter()
|
||||
router.register('links', LinkViewSet, basename='link')
|
||||
@@ -17,4 +19,17 @@ urlpatterns = [
|
||||
path('auth/login/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
|
||||
path('auth/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
|
||||
path('auth/user/', UserProfileView.as_view(), name='user-profile'), # ← новый
|
||||
path('users/<str:username>/public/',
|
||||
PublicUserGroupsView.as_view(),
|
||||
name='public-user-groups'
|
||||
),
|
||||
# схема OpenAPI
|
||||
path('schema/', SpectacularAPIView.as_view(), name='schema'),
|
||||
# Swagger UI, берёт шаблон из drf_spectacular_sidecar
|
||||
path(
|
||||
'swagger/',
|
||||
SpectacularSwaggerView.as_view(url_name='schema'),
|
||||
name='swagger-ui'
|
||||
),
|
||||
|
||||
] + router.urls
|
||||
Reference in New Issue
Block a user