You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
464 B

from rest_framework import generics
from .serializers import SessionSerializer
from .models import Session
class SessionList(generics.ListCreateAPIView):
queryset = Session.objects.all() # tell django how to retrieve all objects from the DB
serializer_class = SessionSerializer # tell django what serializer to use
class SessionDetail(generics.RetrieveUpdateDestroyAPIView):
queryset = Session.objects.all()
serializer_class = SessionSerializer