diff --git a/photo21/forms.py b/photo21/forms.py index a54aabc..7c15e1e 100644 --- a/photo21/forms.py +++ b/photo21/forms.py @@ -2,9 +2,9 @@ # Copyright (C) 2022 Amicale des élèves de l'ENS Paris-Saclay # SPDX-License-Identifier: GPL-3.0-or-later +from allauth.account.forms import SignupForm from django import forms from django.utils.translation import gettext_lazy as _ -from allauth.account.forms import SignupForm class CustomSignupForm(SignupForm): diff --git a/photo21/hashers.py b/photo21/hashers.py index de29ba8..4108f9c 100644 --- a/photo21/hashers.py +++ b/photo21/hashers.py @@ -2,14 +2,14 @@ # Copyright (C) 2022 Amicale des élèves de l'ENS Paris-Saclay # SPDX-License-Identifier: GPL-3.0-or-later -import hashlib import base64 +import hashlib from collections import OrderedDict +from django.contrib.auth.hashers import BasePasswordHasher, mask_hash from django.utils.crypto import constant_time_compare from django.utils.encoding import force_bytes from django.utils.translation import gettext_noop as _ -from django.contrib.auth.hashers import mask_hash, BasePasswordHasher class SHA512PasswordHasher(BasePasswordHasher): diff --git a/photo21/settings.py b/photo21/settings.py index 8bd46dd..d34471f 100644 --- a/photo21/settings.py +++ b/photo21/settings.py @@ -14,8 +14,8 @@ https://docs.djangoproject.com/en/2.2/ref/settings/ import os -from django.utils.translation import gettext_lazy as _ from django.contrib.messages import constants as messages +from django.utils.translation import gettext_lazy as _ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) diff --git a/photo21/urls.py b/photo21/urls.py index 6ed415e..8c4d5dd 100644 --- a/photo21/urls.py +++ b/photo21/urls.py @@ -8,10 +8,10 @@ The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ """ -from django.contrib import admin -from django.urls import include, path, re_path from django.conf import settings from django.conf.urls.static import static +from django.contrib import admin +from django.urls import include, path, re_path from .views import IndexView, MediaAccess diff --git a/photo21/views.py b/photo21/views.py index 5d4eb1a..eec62cd 100644 --- a/photo21/views.py +++ b/photo21/views.py @@ -3,8 +3,8 @@ # SPDX-License-Identifier: GPL-3.0-or-later from django.contrib.auth.mixins import LoginRequiredMixin -from django.views.generic import ListView, View from django.http import HttpResponse +from django.views.generic import ListView, View from photologue.models import Gallery