fields = 'name',


class CustomUserRegistrationSerializer(serializers.ModelSerializer):
    password = serializers.CharField(style={'input_type': 'password'},
        write_only=True, validators=settings.get('PASSWORD_VALIDATORS'))
company = CompanySerializer(allow_null=False, required=True, write_only=True)


class Meta:
    model = User
fields = 'username', 'email', 'password', 'company', 'first_name', 'last_name'
Дополнительные поля сериализатора в Django REST Framework 3