duck-booking-tool/api/viewsets.py

12 lines
314 B
Python
Raw Normal View History

2015-05-27 22:33:19 +00:00
# -*- 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