from rest_framework import permissions, viewsets

from locations.api import serializers
from locations import models


class GeoLocationViewSet(viewsets.ModelViewSet):
    queryset = models.GeoLocation.objects.all().order_by("-created")
    serializer_class = serializers.GeoLocationSerializer
    permission_classes = [permissions.IsAuthenticated]
