15 lines
510 B
Python
15 lines
510 B
Python
"""Provide an interface to countdown items."""
|
|
from rest_framework.permissions import IsAuthenticated
|
|
from rest_framework.viewsets import ReadOnlyModelViewSet
|
|
|
|
from countdown.models import CountdownItem
|
|
from countdown.serializers import CountdownItemSerializer
|
|
|
|
|
|
class CountdownItemViewSet(ReadOnlyModelViewSet):
|
|
"""Provide list and detail actions for countdown items."""
|
|
|
|
queryset = CountdownItem.objects.all()
|
|
serializer_class = CountdownItemSerializer
|
|
permission_classes = [IsAuthenticated]
|