text: from rest_framework import viewsets
  from rest_framework.authentication import TokenAuthentication
  from rest_framework.permissions import IsAuthenticatedOrReadOnly
  
  from locations.models import Location
  from .serializers import LocationSerializer
  
  
  class LocationViewSet(viewsets.ModelViewSet):
  
      queryset = Location.objects.all()
      serializer_class = LocationSerializer
      permission_classes = (IsAuthenticatedOrReadOnly,)
      authentication_classes = (TokenAuthentication,)
  
  