Добавлены сериализаторы и произведена небольшая коррекция моделей модуля тестов
This commit is contained in:
1 parent
52ac220377
commit
9adcfb26bc
5 files changed
+78
-13
No files matched your search
+11
-1
@@ -1,3 +1,13 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
from rest_framework.views import APIView
|
||||
from rest_framework.response import Response
|
||||
from .models import *
|
||||
from .serializers import *
|
||||
|
||||
# Create your views here.
|
||||
|
||||
|
||||
class GetAllTests(APIView):
|
||||
def get(request,self):
|
||||
all_tests = Test.objects.all()
|
||||
return Response(TestSerializer(all_tests, many=True).data )
|
||||
Reference in new issue
Block a user