Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- url = "http://sms.ru/sms/send?api_id=%s&from=%s&to=%s&msg=%s" % (SMS_API_ID, 'Durex', phone, sms_text)
- try:
- res = urlopen(url, timeout=10)
- print("GET: %s %s\nReply:\n%s" % (res.geturl(), res.msg, res.info()))
- user.set_password(password)
- user.save()
- except URLError as errstr:
- print("smssend[debug]: %s" % url)
- return Response('sms.ru failed', status=400)
- return Response('Password sent', status=200)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement