urls.py
1.04 KB
from django.urls import path, include
from . import views
from rest_framework.authtoken.views import obtain_auth_token
from rest_framework import routers, renderers
router = routers.DefaultRouter()
router.register(r'users', views.UserViewSet)
router.register(r'sequences', views.SequenceViewSet)
router.register(r'albums', views.AlbumViewSet)
router.register(r'plans', views.PlanViewSet)
router.register(r'full_sequences', views.FullSequenceViewSet)
router.register(r'scientific_programs', views.ScientificProgramViewSet)
router.register(r'sp_period', views.SPPeriodViewSet)
router.register(r'agent_survey', views.AgentSurveyViewSet)
router.register(r'agent_cmd', views.AgentCmdViewSet)
urlpatterns = [
path('', include(router.urls)),
path('logout/', views.user_logout, name='logout'),
path('api-token-auth/', obtain_auth_token, name='api_token_auth'),
path("submit_sequence", views.submit_sequence_with_json,
name="api_submit_sequence"),
path("agent_cmd/<str:agent_name>",views.AgentCmdViewSet.as_view({'get': 'list'}))
] + router.urls