Пример #1
0
class LegacyTeamSerializer(ModelSerializer):
    class Meta:
        model = Team

    thumbnail = Base64ImageField(max_length=None, use_url=True, required=False)
    users = StringRelatedField(many=True, read_only=True)
    images = LegacyTeamImageSerializer(many=True, read_only=True)
Пример #2
0
class LegacyEntrySerializer(ModelSerializer):
    class Meta:
        model = Entry

    thumbnail = Base64ImageField(max_length=0,
                                 allow_empty_file=True,
                                 use_url=True)
    author = StringRelatedField(read_only=True)
Пример #3
0
class LegacyEventSerializer(serializers.ModelSerializer):
    class Meta:
        model = Event

    thumbnail = Base64ImageField(
        max_length=None,
        use_url=True,
    )
Пример #4
0
class LegacyEventSerializer(ModelSerializer):
    class Meta:
        model = Event

    questionaire = LegacyQuestionSetSerializer(read_only=True)
    feedbacksheet = LegacyQuestionSetSerializer(read_only=True)
    organizers = StringRelatedField(many=True, read_only=True)
    members = StringRelatedField(many=True, read_only=True)
    organizing_committee = SlugRelatedField("slug", many=True, read_only=True)
    thumbnail = Base64ImageField(max_length=0, use_url=True)
    images = LegacyEventImageSerializer(many=True, read_only=True)
Пример #5
0
class LegacyAccountSerializer(ModelSerializer):
    class Meta:
        model = Eestecer

    thumbnail = Base64ImageField(
        max_length=None,
        use_url=True,
    )
    curriculum_vitae = Base64PdfField(
        max_length=None,
        use_url=True,
    )
Пример #6
0
class LegacyEventImageSerializer(ModelSerializer):
    class Meta:
        model = EventImage

    property = StringRelatedField(read_only=True)
    image = Base64ImageField(max_length=0, use_url=True)