From a46e9392a4426f8d0dee02a94e7792084d76faf0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 20:05:22 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- realtoric/users/admin.py | 1 - realtoric/users/tests/factories.py | 1 - realtoric/users/views.py | 3 --- 3 files changed, 5 deletions(-) diff --git a/realtoric/users/admin.py b/realtoric/users/admin.py index 106ddc5..d80c742 100644 --- a/realtoric/users/admin.py +++ b/realtoric/users/admin.py @@ -10,7 +10,6 @@ @admin.register(User) class UserAdmin(auth_admin.UserAdmin): - form = UserAdminChangeForm add_form = UserAdminCreationForm fieldsets = ( diff --git a/realtoric/users/tests/factories.py b/realtoric/users/tests/factories.py index e304762..36f9634 100644 --- a/realtoric/users/tests/factories.py +++ b/realtoric/users/tests/factories.py @@ -7,7 +7,6 @@ class UserFactory(DjangoModelFactory): - username = Faker("user_name") email = Faker("email") name = Faker("name") diff --git a/realtoric/users/views.py b/realtoric/users/views.py index 430e8c8..b339f66 100644 --- a/realtoric/users/views.py +++ b/realtoric/users/views.py @@ -11,7 +11,6 @@ class UserDetailView(LoginRequiredMixin, DetailView): - model = User slug_field = "username" slug_url_kwarg = "username" @@ -40,7 +39,6 @@ def get_context_data(self, **kwargs): class UserUpdateView(LoginRequiredMixin, SuccessMessageMixin, UpdateView): - model = User fields = ["username", "email", "phone", "name", "address"] success_message = _("Information successfully updated") @@ -59,7 +57,6 @@ def get_object(self): class UserRedirectView(LoginRequiredMixin, RedirectView): - permanent = False def get_redirect_url(self):