OpenSlides/openslides/core/serializers.py
Norman Jäckel eed5c59013 Refactored serializers and autoupdate.
Added api for groups.
Refactored serializers now using 'id' instead of 'url'.
Rework of tornado autoupdate functionality.
Implemented extra data in SockJS messages.
2015-02-05 19:49:54 +01:00

22 lines
493 B
Python

from openslides.utils.rest_api import serializers
from .models import CustomSlide, Tag
class CustomSlideSerializer(serializers.ModelSerializer):
"""
Serializer for core.models.CustomSlide objects.
"""
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',)