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.
 

25 lines
715 B

from django.contrib.auth.models import User, Group
from rest_framework import serializers
from base.models import Layer, Place
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ['url', 'username', 'email', 'groups']
class GroupSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Group
fields = ['url', 'name']
class PlaceSerializer(serializers.ModelSerializer):
class Meta:
model = Place
fields = '__all__'
class LayerSerializer(serializers.ModelSerializer):
places = PlaceSerializer(many=True, source='place_set')
class Meta:
model = Layer
fields = '__all__'