from rest_framework import permissions, viewsets

from lifeevents.api import serializers
from lifeevents import models


class LifeEventViewSet(viewsets.ModelViewSet):
    queryset = models.LifeEvent.objects.all().order_by("-created")
    serializer_class = serializers.LifeEventSerializer
    permission_classes = [permissions.IsAuthenticated]
