duck-booking-tool/api/viewsets.py

12 lines
314 B
Python

# -*- coding: utf-8 -*-
from django.contrib.auth.models import User
from rest_framework import viewsets, permissions
from .serializers import DuckSerializer
from booking.models import Duck
class DuckViewSet(viewsets.ReadOnlyModelViewSet):
queryset = Duck.objects.all()
serializer_class = DuckSerializer