2015-02-12 18:48:14 +01:00
|
|
|
from openslides.utils.rest_api import ModelSerializer
|
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-12 18:48:14 +01:00
|
|
|
class CustomSlideSerializer(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-12 18:48:14 +01:00
|
|
|
class TagSerializer(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',)
|