# Create your views here.
from django.contrib.auth.models import User, Group
from models import Binnacle_entry
from rest_framework import viewsets
from serializers import UserSerializer, GroupSerializer, Binnacle_entrySerializer


class UserViewSet(viewsets.ModelViewSet):
    """
        API endpoint that allows users to be viewed or edited.
    """
    queryset = User.objects.all()
    serializer_class = UserSerializer

class GroupViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows groups to be viewed or edited.
    """
    queryset = Group.objects.all()
    serializer_class = GroupSerializer

class Binnacle_entryViewSet(viewsets.ModelViewSet):
    queryset = Binnacle_entry.objects.all()
    serializer_class = Binnacle_entrySerializer

# Create your views here.
from django.contrib.auth.models import User, Group
from models import Binnacle_entry
from rest_framework import viewsets
from serializers import UserSerializer, GroupSerializer, Binnacle_entrySerializer


class UserViewSet(viewsets.ModelViewSet):
    """
        API endpoint that allows users to be viewed or edited.
    """
    queryset = User.objects.all()
    serializer_class = UserSerializer

class GroupViewSet(viewsets.ModelViewSet):
    """
    API endpoint that allows groups to be viewed or edited.
    """
    queryset = Group.objects.all()
    serializer_class = GroupSerializer

class Binnacle_entryViewSet(viewsets.ModelViewSet):
    queryset = Binnacle_entry.objects.all()
    serializer_class = Binnacle_entrySerializer

# Create your views here. API endpoint that allows users to be viewed or edited. API endpoint that allows groups to be viewed or edited.