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.

16 lines
619 B

from rest_framework.authentication import SessionAuthentication, BasicAuthentication, TokenAuthentication
from rest_framework import viewsets
from rest_framework import permissions
from pak.serializers import PakSerializer, CitySerializer
from pak.models import Pak, City
class PakViewSet(viewsets.ReadOnlyModelViewSet):
"""
API endpoint that allows users to be viewed or edited.
"""
queryset = Pak.objects.all()
serializer_class = PakSerializer
permission_classes = [permissions.IsAuthenticated]
authentication_classes = [SessionAuthentication, BasicAuthentication, TokenAuthentication]