Backend for simplestreetmap. - Display caldav event on the map - Share maps with tokens - Integrate external api like train api (sncf) to display journey on the map
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.
 

32 lines
1005 B

from django.contrib.auth.models import User, Group
from rest_framework import viewsets
from rest_framework import permissions
from base.serializers import UserSerializer, GroupSerializer, LayerSerializer
from base.models import Layer
class UserViewSet(viewsets.ModelViewSet):
"""
API endpoint that allows users to be viewed or edited.
"""
queryset = User.objects.all().order_by('-date_joined')
serializer_class = UserSerializer
permission_classes = [permissions.IsAuthenticated]
class GroupViewSet(viewsets.ModelViewSet):
"""
API endpoint that allows groups to be viewed or edited.
"""
queryset = Group.objects.all()
serializer_class = GroupSerializer
permission_classes = [permissions.IsAuthenticated]
class LayerViewSet(viewsets.ModelViewSet):
"""
API endpoint that allows groups to be viewed or edited.
"""
queryset = Layer.objects.all()
serializer_class = LayerSerializer
permission_classes = [permissions.IsAuthenticated]