OpenSlides/openslides/core/serializers.py

22 lines
493 B
Python
Raw Normal View History

from openslides.utils.rest_api import serializers
2015-01-06 00:04:36 +01:00
from .models import CustomSlide, Tag
2015-01-06 00:04:36 +01:00
class CustomSlideSerializer(serializers.ModelSerializer):
2015-01-06 00:04:36 +01:00
"""
Serializer for core.models.CustomSlide objects.
2015-01-06 00:04:36 +01:00
"""
class Meta:
model = CustomSlide
fields = ('id', 'title', 'text', 'weight',)
class TagSerializer(serializers.ModelSerializer):
"""
Serializer for core.models.Tag objects.
"""
class Meta:
model = Tag
fields = ('id', 'name',)