6
0

urls.py 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. """pycs_backend URL Configuration
  2. The `urlpatterns` list routes URLs to views. For more information please see:
  3. https://docs.djangoproject.com/en/3.2/topics/http/urls/
  4. Examples:
  5. Function views
  6. 1. Add an import: from my_app import views
  7. 2. Add a URL to urlpatterns: path('', views.home, name='home')
  8. Class-based views
  9. 1. Add an import: from other_app.views import Home
  10. 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
  11. Including another URLconf
  12. 1. Import the include() function: from django.urls import include, path
  13. 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
  14. """
  15. from django.urls import include
  16. from django.urls import path
  17. from pycs_api import views
  18. urlpatterns = [
  19. path('', include(views.router.urls)),
  20. path('api-token/',
  21. views.TokenObtainPairView.as_view(), name="obtain-token"),
  22. path('api-token-refresh/',
  23. views.TokenRefreshView.as_view(), name="refresh-token"),
  24. # path('projects/',
  25. # views.ProjectView.as_view(), name="projects"),
  26. # path('projects/<int:project_id>/remove',
  27. # views.ProjectView.remove, name="remove_project"),
  28. # path('projects/<int:project_id>/name',
  29. # views.ProjectView.edit_name, name="edit_project_name"),
  30. # path('projects/<int:project_id>/description',
  31. # views.ProjectView.edit_description, name="edit_project_description"),
  32. # path('projects/<int:project_id>/external_storage',
  33. # views.ProjectView.run_external_storage, name="execute_external_storage"),
  34. # path('projects/<int:project_id>/label_provider',
  35. # views.ProjectView.run_label_provider, name="execute_label_provider"),
  36. ]