Django backend for WorkX project
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

34 lines
1.1 KiB

  1. from django.contrib import admin
  2. from django.urls import path, include
  3. from rest_framework import routers
  4. from workx_backend.views import UserViewSet
  5. from rest_framework import permissions
  6. from drf_yasg.views import get_schema_view
  7. from drf_yasg import openapi
  8. schema_view = get_schema_view(
  9. openapi.Info(
  10. title="Snippets API",
  11. default_version='v1',
  12. description="Test description",
  13. terms_of_service="https://www.google.com/policies/terms/",
  14. contact=openapi.Contact(email="contact@snippets.local"),
  15. license=openapi.License(name="BSD License"),
  16. ),
  17. public=True,
  18. permission_classes=[permissions.AllowAny],
  19. )
  20. router = routers.DefaultRouter()
  21. router.register(r'users', UserViewSet)
  22. urlpatterns = [
  23. path('workx/', include([
  24. path('swagger/', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
  25. path('redoc/', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
  26. path('admin/', admin.site.urls),
  27. path('api/', include(router.urls)),
  28. path('', include('drfpasswordless.urls')),
  29. ]))
  30. ]