Fix deprecation warnings for Django 1.11 and Django 2.0.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-07-21 00:25:18 -04:00
parent 42a762481b
commit f09321f6ab
81 changed files with 173 additions and 135 deletions

View File

@@ -6,10 +6,11 @@ from django.contrib.auth.views import (
login, password_change, password_reset, password_reset_confirm,
password_reset_complete, password_reset_done
)
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.shortcuts import redirect
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from stronghold.decorators import public
from .forms import EmailAuthenticationForm, UsernameAuthenticationForm
@@ -29,7 +30,7 @@ def login_view(request):
else:
kwargs['authentication_form'] = UsernameAuthenticationForm
if not request.user.is_authenticated():
if not request.user.is_authenticated:
extra_context = {'appearance_type': 'plain'}
result = login(request, extra_context=extra_context, **kwargs)