28 lines
1.1 KiB
Python
28 lines
1.1 KiB
Python
from django.conf.urls.static import static
|
|
from django.contrib import admin
|
|
from django.urls import path, include
|
|
from drf_spectacular.views import SpectacularSwaggerView, SpectacularAPIView
|
|
from django.conf import settings
|
|
from rest_framework_simplejwt.views import TokenObtainPairView,TokenRefreshView
|
|
from product import views
|
|
|
|
urlpatterns = [
|
|
|
|
# djoser
|
|
path('auth/', include('djoser.urls')),
|
|
path('auth/', include('djoser.urls.jwt')),
|
|
|
|
|
|
path('token/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
|
|
path('token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
|
|
path('admin/', admin.site.urls),
|
|
path('schema/', SpectacularAPIView.as_view(), name='schema'),
|
|
# path('comment/<int:pk>', views.CommentView.as_view(), name='comment-list'),
|
|
path('products/', include('product.urls')),
|
|
path('accounts/', include('account.urls')),
|
|
path('', SpectacularSwaggerView.as_view(url_name='schema'), name='swagger-ui'),
|
|
]
|
|
|
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
|
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|