<commit_before>from rest_framework import serializers
from django.contrib.auth.models import User, Group
from .models import Source, Registration


class UserSerializer(serializers.HyperlinkedModelSerializer):

    class Meta:
        model = User
        fields = ('url', 'username', 'email', 'groups')


class GroupSerializer(serializers.HyperlinkedModelSerializer):

    class Meta:
        model = Group
        fields = ('url', 'name')


class SourceSerializer(serializers.HyperlinkedModelSerializer):

    class Meta:
        model = Source
        fields = ('url', 'id', 'name', 'user')


class RegistrationSerializer(serializers.HyperlinkedModelSerializer):

    class Meta:
        model = Registration
        fields = ('url', 'id', 'hcw_msisdn', 'mom_msisdn', 'mom_id_type',
                  'mom_lang', 'mom_edd', 'mom_id_no', 'mom_dob', 'clinic_code',
                  'authority', 'source', )
<commit_msg>serialize new field passport origin<commit_after>from rest_framework import serializers
from django.contrib.auth.models import User, Group
from .models import Source, Registration


class UserSerializer(serializers.HyperlinkedModelSerializer):

    class Meta:
        model = User
        fields = ('url', 'username', 'email', 'groups')


class GroupSerializer(serializers.HyperlinkedModelSerializer):

    class Meta:
        model = Group
        fields = ('url', 'name')


class SourceSerializer(serializers.HyperlinkedModelSerializer):

    class Meta:
        model = Source
        fields = ('url', 'id', 'name', 'user')


class RegistrationSerializer(serializers.HyperlinkedModelSerializer):

    class Meta:
        model = Registration
        fields = ('url', 'id', 'hcw_msisdn', 'mom_msisdn', 'mom_id_type',
                  'mom_passport_origin', 'mom_lang', 'mom_edd', 'mom_id_no',
                  'mom_dob', 'clinic_code', 'authority', 'source', )

{'fraction_non_alphanumeric': 0.11605723370429252, 'fraction_numerical': 0.0, 'mean_word_length': 3.452830188679245, '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': '3191962', 'n_tokens_mistral': 561, 'n_tokens_neox': 510, 'n_words': 133}