Beispiel #1
0
from django.urls import path
from django.conf.urls import include
from rest_framework import routers
from api.views import UserViewSet, ManageUserView, TaskViewSet

router = routers.DefaultRouter()
router.register('tasks', TaskViewSet)
router.register('users', UserViewSet)

urlpatterns = [
    path('myself/', ManageUserView.as_view(), name='myself'),
    path('', include(router.urls))
]
Beispiel #2
0
from django.urls import path
from django.conf.urls import include
from rest_framework import routers
from api.views import TaskViewSet, UserViewSet, ManageUserView

router = routers.DefaultRouter()
router.register("tasks", TaskViewSet)
router.register("users", UserViewSet)

urlpatterns = [
    path('myself/', ManageUserView.as_view(), name="myself"),
    path('', include(router.urls)),
]
Beispiel #3
0
from django.urls import path
from django.conf.urls import include
from rest_framework import routers
from api.views import TaskViewSet, UserViewSet, ManageUserView

router = routers.DefaultRouter()
router.register('tasks', TaskViewSet)
router.register('users', UserViewSet)

urlpatterns = [
    path("myself/", ManageUserView.as_view(), name="myself"),
    path("", include(router.urls)),
]