создание Test
This commit is contained in:
1 parent
cf527a6919
commit
b8a137ae8e
2 files changed
+2
-2
No files matched your search
@@ -4,7 +4,7 @@ from .views import *
|
|||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('testdetail/<int:id>/', TestDetail.as_view(),name='TestDetail'),
|
path('testdetail/<int:id>/', TestDetail.as_view(),name='TestDetail'),
|
||||||
path('testlist/', TestList.as_view(), name="TestList"),
|
path('testlistcreate/', TestListCreate.as_view(), name="TestListCreate"),
|
||||||
path('gettesting/', GetTesting.as_view(), name="GetTesting"),
|
path('gettesting/', GetTesting.as_view(), name="GetTesting"),
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ class TestDetail(generics.RetrieveUpdateDestroyAPIView):
|
|||||||
lookup_url_kwarg = 'id'
|
lookup_url_kwarg = 'id'
|
||||||
lookup_field = 'id'
|
lookup_field = 'id'
|
||||||
|
|
||||||
class TestList(generics.ListAPIView):
|
class TestListCreate(generics.ListCreateAPIView):
|
||||||
queryset = Test.objects.all()
|
queryset = Test.objects.all()
|
||||||
serializer_class = TestSerializer
|
serializer_class = TestSerializer
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user