Class Reference

Admin Site

Decorators

django_otp.decorators.otp_required(view=None, redirect_field_name=u'next', login_url=None, if_configured=False)

Similar to login_required(), but requires the user to be verified. By default, this redirects users to :setting:`OTP_LOGIN_URL`.

Parameters:if_configured (bool) – If True, an authenticated user with no confirmed OTP devices will be allowed. Default is False.

Models

Middleware

Signals

two_factor.signals.user_verified

Sent when a user is verified against a OTP device. Provides the following arguments:

sender
The class sending the signal ('two_factor.views.core').
user
The user that was verified.
device
The OTP device that was used.
request
The HttpRequest in which the user was verified.

Template Tags

Views

View Mixins