mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-23 01:26:39 +03:00
conditional import
This commit is contained in:
parent
a9d2a24011
commit
8ea935ef40
|
@ -1,7 +1,12 @@
|
|||
from django.http import HttpRequest
|
||||
from rest_framework import serializers
|
||||
from requests.exceptions import HTTPError
|
||||
# Import is needed only if we are using social login, in which
|
||||
# case the allauth.socialaccount will be declared
|
||||
try:
|
||||
from allauth.socialaccount.helpers import complete_social_login
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
class SocialLoginSerializer(serializers.Serializer):
|
||||
|
|
Loading…
Reference in New Issue
Block a user