Append more information to comment

Explain why we are defining JWTUserDetailsSerializer in registration/serializers.py instead of getting it from app_settings.py
This commit is contained in:
Maxim Kukhtenkov 2016-11-30 20:03:34 -08:00
parent dd6db3563f
commit ca62f44061

View File

@ -131,8 +131,8 @@ class UserDetailsSerializer(serializers.ModelSerializer):
read_only_fields = ('email', ) read_only_fields = ('email', )
# Required to allow using custom UserDetailsSerializer in # Required to allow using custom USER_DETAILS_SERIALIZER in
# JWTSerializer # JWTSerializer. Defining it here to avoid circular imports
rest_auth_serializers = getattr(settings, 'REST_AUTH_SERIALIZERS', {}) rest_auth_serializers = getattr(settings, 'REST_AUTH_SERIALIZERS', {})
JWTUserDetailsSerializer = import_callable( JWTUserDetailsSerializer = import_callable(
rest_auth_serializers.get('USER_DETAILS_SERIALIZER', UserDetailsSerializer) rest_auth_serializers.get('USER_DETAILS_SERIALIZER', UserDetailsSerializer)