@@ 10,14 10,14 @@ config = Config()
urlpatterns = [
url(r'^login/$',
- auth_views.login, {
- 'template_name': 'baseacct/login.html',
- 'authentication_form': config.get_login_form(),
- }, name='baseacct-login'),
+ auth_views.LoginView.as_view(
+ template_name='baseacct/login.html',
+ authentication_form=config.get_login_form(),
+ ), name='baseacct-login'),
url(r'^logout/$',
- auth_views.logout, {
- 'template_name': 'baseacct/logout.html',
- }, name='baseacct-logout'),
+ auth_views.LogoutView.as_view(
+ template_name='baseacct/logout.html',
+ ), name='baseacct-logout'),
url(r'^logout-login/$',
auth_views.logout_then_login,
{'login_url': config.get_login_url()},
@@ 7,7 7,7 @@ class EmailBackend(object):
supports_inactive_user = False
supports_object_permissions = False
- def authenticate(self, username=None, password=None):
+ def authenticate(self, request, username=None, password=None):
if '@' in username:
kwargs = {'email__iexact': username}
else: