2015-01-24 16:35:50 +01:00
|
|
|
from openslides.utils.rest_api import serializers
|
2015-01-06 00:04:36 +01:00
|
|
|
|
2015-01-17 14:25:05 +01:00
|
|
|
from .models import CustomSlide, Tag
|
2015-01-06 00:04:36 +01:00
|
|
|
|
|
|
|
|
2015-02-04 00:08:38 +01:00
|
|
|
class CustomSlideSerializer(serializers.ModelSerializer):
|
2015-01-06 00:04:36 +01:00
|
|
|
"""
|
2015-01-17 14:25:05 +01:00
|
|
|
Serializer for core.models.CustomSlide objects.
|
2015-01-06 00:04:36 +01:00
|
|
|
"""
|
|
|
|
class Meta:
|
|
|
|
model = CustomSlide
|
2015-02-04 00:08:38 +01:00
|
|
|
fields = ('id', 'title', 'text', 'weight',)
|
2015-01-17 14:25:05 +01:00
|
|
|
|
|
|
|
|
2015-02-04 00:08:38 +01:00
|
|
|
class TagSerializer(serializers.ModelSerializer):
|
2015-01-17 14:25:05 +01:00
|
|
|
"""
|
|
|
|
Serializer for core.models.Tag objects.
|
|
|
|
"""
|
|
|
|
class Meta:
|
|
|
|
model = Tag
|
2015-02-04 00:08:38 +01:00
|
|
|
fields = ('id', 'name',)
|