mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-10 19:26:35 +03:00
42 lines
1.3 KiB
Python
42 lines
1.3 KiB
Python
from django.conf import settings
|
|
|
|
from rest_auth.serializers import (
|
|
TokenSerializer as DefaultTokenSerializer,
|
|
UserDetailsSerializer as DefaultUserDetailsSerializer,
|
|
LoginSerializer as DefaultLoginSerializer,
|
|
PasswordResetSerializer as DefaultPasswordResetSerializer,
|
|
PasswordResetConfirmSerializer as DefaultPasswordResetConfirmSerializer,
|
|
PasswordChangeSerializer as DefaultPasswordChangeSerializer)
|
|
from .utils import import_callable
|
|
|
|
|
|
serializers = getattr(settings, 'REST_AUTH_SERIALIZERS', {})
|
|
|
|
TokenSerializer = import_callable(
|
|
serializers.get('TOKEN_SERIALIZER', DefaultTokenSerializer))
|
|
|
|
UserDetailsSerializer = import_callable(
|
|
serializers.get('USER_DETAILS_SERIALIZER', DefaultUserDetailsSerializer)
|
|
)
|
|
|
|
LoginSerializer = import_callable(
|
|
serializers.get('LOGIN_SERIALIZER', DefaultLoginSerializer)
|
|
)
|
|
|
|
PasswordResetSerializer = import_callable(
|
|
serializers.get('PASSWORD_RESET_SERIALIZER',
|
|
DefaultPasswordResetSerializer)
|
|
)
|
|
|
|
PasswordResetConfirmSerializer = import_callable(
|
|
serializers.get('PASSWORD_RESET_CONFIRM_SERIALIZER',
|
|
DefaultPasswordResetConfirmSerializer)
|
|
)
|
|
|
|
PasswordChangeSerializer = import_callable(
|
|
serializers.get('PASSWORD_CHANGE_SERIALIZER',
|
|
DefaultPasswordChangeSerializer)
|
|
)
|
|
|
|
|