views.py 402 B

123456789101112131415161718
  1. from django.shortcuts import render
  2. # Create your views here.
  3. from django.http import HttpResponse
  4. def index(request):
  5. return HttpResponse("hello django")
  6. from rest_framework_bulk import BulkModelViewSet
  7. from api.task.models import Task
  8. from api.task.serializers import TaskSerializer
  9. class TaskView(BulkModelViewSet):
  10. queryset = Task.objects.all()
  11. serializer_class = TaskSerializer