From ca62f440611e5c225cf7c98ed30fe33998eeb8e6 Mon Sep 17 00:00:00 2001 From: Maxim Kukhtenkov Date: Wed, 30 Nov 2016 20:03:34 -0800 Subject: [PATCH] Append more information to comment Explain why we are defining JWTUserDetailsSerializer in registration/serializers.py instead of getting it from app_settings.py --- rest_auth/serializers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rest_auth/serializers.py b/rest_auth/serializers.py index 4d5d194..d682566 100644 --- a/rest_auth/serializers.py +++ b/rest_auth/serializers.py @@ -131,8 +131,8 @@ class UserDetailsSerializer(serializers.ModelSerializer): read_only_fields = ('email', ) -# Required to allow using custom UserDetailsSerializer in -# JWTSerializer +# Required to allow using custom USER_DETAILS_SERIALIZER in +# JWTSerializer. Defining it here to avoid circular imports rest_auth_serializers = getattr(settings, 'REST_AUTH_SERIALIZERS', {}) JWTUserDetailsSerializer = import_callable( rest_auth_serializers.get('USER_DETAILS_SERIALIZER', UserDetailsSerializer)