python: Use python3 style super() in 2FA code paths.

This commit is contained in:
Raymond Akornor
2018-06-05 03:55:42 +00:00
committed by Tim Abbott
parent 6111b4ebd0
commit 0335da7e05
2 changed files with 2 additions and 2 deletions

View File

@@ -564,7 +564,7 @@ class TwoFactorLoginView(BaseTwoFactorLoginView):
super().__init__(*args, **kwargs)
def get_context_data(self, **kwargs: Any) -> Dict[str, Any]:
context = super(TwoFactorLoginView, self).get_context_data(**kwargs)
context = super().get_context_data(**kwargs)
if self.extra_context is not None:
context.update(self.extra_context)
update_login_page_context(self.request, context)

View File

@@ -488,7 +488,7 @@ ALLOWED_HOSTS += REALM_HOSTS.values()
from django.template.loaders import app_directories
class TwoFactorLoader(app_directories.Loader):
def get_dirs(self):
dirs = super(TwoFactorLoader, self).get_dirs()
dirs = super().get_dirs()
return [d for d in dirs if 'two_factor' in d]
MIDDLEWARE = (