name='user-view', detail=False, initkwargs={'suffix': 'View'}), # User Detail Route Route(url=r'^user{trailing_slash}{lookup}{trailing_slash}$', mapping={ 'get': 'view_user_by_id', 'patch': 'update_user_by_id', 'delete': 'destroy_user_by_id' }, name='user-detail', detail=True, initkwargs={'suffix': 'Detail'}), # Tag View Route Route(url=r'^tag{trailing_slash}{lookup}{trailing_slash}$', mapping={'get': 'view_tag'}, name='tag-view', detail=False, initkwargs={'suffix': 'View'}) ] router.register('user', views.UserViewSet) router.register('user', views.UserDetailViewSet) urlpatterns = [ path('', include(router.urls)), path('token/', views.AuthTokenViewSet.as_view(), name='token-view') ]
}, name='allergy-view', detail=False, initkwargs={'suffix': 'View'}), # Allergy Detail Route Route(url=r'^record{trailing_slash}allergy{trailing_slash}{lookup}' r'{trailing_slash}$', mapping={ 'get': 'view_allergy_by_id', 'patch': 'update_allergy_by_id', 'delete': 'destroy_allergy_by_id' }, name='allergy-detail', detail=True, initkwargs={'suffix': 'Detail'}) ] router.register('record', views.MedicalHistoryViewSet) router.register('record', views.MedicalHistoryDetailViewSet) router.register('record', views.PrescriptionViewSet) router.register('record', views.PrescriptionDetailViewSet) router.register('record', views.VisitViewSet) router.register('record', views.VisitDetailViewSet) router.register('record', views.AllergyViewSet) router.register('record', views.AllergyDetailViewSet) urlpatterns = [ path('', include(router.urls)), ]
name='group-add', detail=True, initkwargs={'suffix': 'Add'}), # Group Remove Route Route(url=r'^twix{trailing_slash}group{trailing_slash}{lookup}' r'{trailing_slash}remove{trailing_slash}$', mapping={ 'post': 'remove_group_member_by_id', }, name='group-remove', detail=True, initkwargs={'suffix': 'Remove'}), ] router.register('twix', views.BoardViewSet) router.register('twix', views.BoardDetailViewSet) router.register('twix', views.TaskViewSet) router.register('twix', views.TaskDetailViewSet) router.register('twix', views.GroupViewSet) router.register('twix', views.GroupDetailViewSet) router.register('twix', views.AssignedTaskViewSet) router.register('twix', views.AssignedTaskDetailViewSet) urlpatterns = [ path('', include(router.urls)), path(r'devices/', views.FCMDeviceCustomAuthViewSet.as_view({'post': 'create'}), name='create_fcm_device') ]
'get': 'view_tracked_repository', 'post': 'create_tracked_repository' }, name='tracked_repository-view', detail=False, initkwargs={'suffix': 'View'}), # User View Route Route(url='^flowie{trailing_slash}user{trailing_slash}$', mapping={'post': 'create_user'}, name='user-view', detail=False, initkwargs={'suffix': 'View'}), # PR Linked Issues View Route Route(url=r'^flowie{trailing_slash}pr{trailing_slash}linked' r'{trailing_slash}issues{trailing_slash}$', mapping={'post': 'view_linked_issues'}, name='pr_linked_issue-view', detail=False, initkwargs={'suffix': 'View'}) ] router.register('flowie', views.TrackedRepositoryViewSet) router.register('flowie', views.UserViewSet) router.register('flowie', views.PRLinkedIssueViewSet) urlpatterns = [ path('', include(router.urls)), ]
from django.urls import path, include from rest_framework.routers import Route from app.urls import router from . import views app_name = 'chat' router.routes += [ # ChatRoom View Route Route(url=r'^chat{trailing_slash}room{trailing_slash}$', mapping={'get': 'view_chat_room'}, name='chat_room-view', detail=False, initkwargs={'suffix': 'View'}), ] router.register('chat', views.ChatRoomViewSet) urlpatterns = [path('', include(router.urls))]
initkwargs={'suffix': 'Detail'} ), # Info User Detail View Set Route( url=r'^forum{trailing_slash}info{trailing_slash}user{trailing_slash}' r'{lookup}{trailing_slash}$', mapping={ 'get': 'view_info_user_by_id', 'patch': 'update_info_user_by_id', }, name='info-user-detail', detail=True, initkwargs={'suffix': 'Detail'} ), ] router.register('forum', views.QuestionViewSet) router.register('forum', views.QuestionDetailViewSet) router.register('forum', views.AnswerViewSet) router.register('forum', views.AnswerDetailViewSet) router.register('forum', views.CommentViewSet) router.register('forum', views.CommentDetailViewSet) router.register('forum', views.ReplyViewSet) router.register('forum', views.ReplyDetailViewSet) router.register('forum', views.InfoUserDetailViewSet) urlpatterns = [ path('', include(router.urls)) ]