87cd31f6a5
Fixed #1450. Updated requirements.
22 lines
473 B
Python
22 lines
473 B
Python
from openslides.utils.rest_api import ModelSerializer
|
|
|
|
from .models import CustomSlide, Tag
|
|
|
|
|
|
class CustomSlideSerializer(ModelSerializer):
|
|
"""
|
|
Serializer for core.models.CustomSlide objects.
|
|
"""
|
|
class Meta:
|
|
model = CustomSlide
|
|
fields = ('id', 'title', 'text', 'weight',)
|
|
|
|
|
|
class TagSerializer(ModelSerializer):
|
|
"""
|
|
Serializer for core.models.Tag objects.
|
|
"""
|
|
class Meta:
|
|
model = Tag
|
|
fields = ('id', 'name',)
|