Skip to content

Commit cbc487c

Browse files
committedApr 14, 2017
Fixed bug with twilio client
1 parent 6d57b4e commit cbc487c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎drfpasswordless/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22

33
__title__ = 'drfpasswordless'
4-
__version__ = '1.0.7'
4+
__version__ = '1.0.8'
55
__author__ = 'Aaron Ng'
66
__license__ = 'MIT'
77
__copyright__ = 'Copyright 2017 Aaron Ng'

‎drfpasswordless/utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ def send_sms_with_callback_token(self, user, mobile_token):
164164
# we assume success to prevent spamming SMS during testing.
165165
return True
166166

167-
from twilio.rest import TwilioRestClient
168-
twilio_client = TwilioRestClient(os.environ['TWILIO_ACCOUNT_SID'], os.environ['TWILIO_AUTH_TOKEN'])
167+
from twilio.rest import Client
168+
twilio_client = Client(os.environ['TWILIO_ACCOUNT_SID'], os.environ['TWILIO_AUTH_TOKEN'])
169169
twilio_client.messages.create(
170170
body=base_string % mobile_token.key,
171171
to=getattr(user, api_settings.PASSWORDLESS_USER_MOBILE_FIELD_NAME),

0 commit comments

Comments
 (0)