relekang / django-nopassword

Authentication backend for django that uses a one time code instead of passwords

Home Page:http://django-nopassword.readthedocs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make it possible to use without twilio

relekang opened this issue · comments

Since TwilioBackend is imported in nopassword/backends/__init__.py. It will crash without the twilio package.

Possible solution in nopassword/backends/__init__.py:

# -*- coding: utf-8 -*-
from .email import EmailBackend
try:
    from .sms import TwilioBackend
except ImportError:
    pass # twilio package not installed