<commit_before>from rest_framework import serializers

from .models import Gallery, Medium


class MediumSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = Medium
        fields = ('id', 'position', 'label', 'description', 'picture', 'medium_url',
                  'url', 'gallery', 'updated_on', )


class GallerySerializer(serializers.HyperlinkedModelSerializer):

    media = serializers.HyperlinkedRelatedField(
        many=True,
        read_only=True,
        view_name='medium-detail'
    )

    class Meta:
        model = Gallery
        fields = ('id', 'url', 'label', 'description', 'media', )<commit_msg>show medium file on api<commit_after>from rest_framework import serializers

from .models import Gallery, Medium


class MediumSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = Medium
        fields = (
                    'id',
                    'position',
                    'label',
                    'description',
                    'picture',
                    'medium_url',
                    'file',
                    'url',
                    'gallery',
                    'updated_on',
                )


class GallerySerializer(serializers.HyperlinkedModelSerializer):

    media = serializers.HyperlinkedRelatedField(
        many=True,
        read_only=True,
        view_name='medium-detail'
    )

    class Meta:
        model = Gallery
        fields = ('id', 'url', 'label', 'description', 'media', )
{'fraction_non_alphanumeric': 0.10335747202106649, 'fraction_numerical': 0.0, 'mean_word_length': 1.9980276134122288, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '472679', 'n_tokens_mistral': 403, 'n_tokens_neox': 368, 'n_words': 89}