From b281241607b8df5378f293e6fcb876cba8fb3267 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 7 Sep 2021 22:38:01 +0200 Subject: [PATCH] remove unneeded override --- InvenTree/InvenTree/urls.py | 3 +-- InvenTree/InvenTree/views.py | 9 +------- .../templates/account/password_change.html | 21 ------------------- 3 files changed, 2 insertions(+), 31 deletions(-) delete mode 100644 InvenTree/templates/account/password_change.html diff --git a/InvenTree/InvenTree/urls.py b/InvenTree/InvenTree/urls.py index 1abb7b50ac..77a0e06a0c 100644 --- a/InvenTree/InvenTree/urls.py +++ b/InvenTree/InvenTree/urls.py @@ -37,7 +37,7 @@ from rest_framework.documentation import include_docs_urls from .views import auth_request from .views import IndexView, SearchView, DatabaseStatsView -from .views import SettingsView, EditUserView, SetPasswordView, CustomEmailView, CustomConnectionsView, CustomPasswordChangeView, CustomPasswordResetFromKeyView +from .views import SettingsView, EditUserView, SetPasswordView, CustomEmailView, CustomConnectionsView, CustomPasswordResetFromKeyView from .views import CurrencyRefreshView from .views import AppearanceSelectView, SettingCategorySelectView from .views import DynamicJsView @@ -166,7 +166,6 @@ urlpatterns = [ # overrides of urlpatterns url(r'^accounts/email/', CustomEmailView.as_view(), name='account_email'), url(r'^accounts/social/connections/', CustomConnectionsView.as_view(), name='socialaccount_connections'), - url(r'^accounts/password/change/', CustomPasswordChangeView.as_view(), name='account_change_password'), url(r"^accounts/password/reset/key/(?P[0-9A-Za-z]+)-(?P.+)/$", CustomPasswordResetFromKeyView.as_view(), name="account_reset_password_from_key"), url(r'^accounts/', include('allauth.urls')), # included urlpatterns ] diff --git a/InvenTree/InvenTree/views.py b/InvenTree/InvenTree/views.py index 14de376d25..af97877933 100644 --- a/InvenTree/InvenTree/views.py +++ b/InvenTree/InvenTree/views.py @@ -27,7 +27,7 @@ from djmoney.contrib.exchange.models import ExchangeBackend, Rate from allauth.account.forms import AddEmailForm from allauth.socialaccount.forms import DisconnectForm from allauth.account.models import EmailAddress -from allauth.account.views import EmailView, PasswordChangeView, PasswordResetFromKeyView +from allauth.account.views import EmailView, PasswordResetFromKeyView from allauth.socialaccount.views import ConnectionsView from common.settings import currency_code_default, currency_codes @@ -850,13 +850,6 @@ class CustomConnectionsView(AllauthOverrides, ConnectionsView): success_url = reverse_lazy("settings") -class CustomPasswordChangeView(LoginRequiredMixin, PasswordChangeView): - """ - Override of allauths PasswordChangeView to always show the settings but leave the functions allow - """ - success_url = reverse_lazy("login") - - class CustomPasswordResetFromKeyView(PasswordResetFromKeyView): """ Override of allauths PasswordResetFromKeyView to always show the settings but leave the functions allow diff --git a/InvenTree/templates/account/password_change.html b/InvenTree/templates/account/password_change.html deleted file mode 100644 index 702094fcba..0000000000 --- a/InvenTree/templates/account/password_change.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends "account/base.html" %} - -{% load i18n crispy_forms_tags inventree_extras %} - -{% block head_title %}{% trans "Change Password" %}{% endblock %} - -{% block content %} - -{% settings_value 'LOGIN_ENABLE_PWD_FORGOT' as enable_pwd_forgot %} - -

{% trans "Change Password" %}

- -
- {% csrf_token %} - {{ form|crispy }} - - {% if enable_pwd_forgot %} - {% trans "Forgot Password?" %} - {% endif %} -
-{% endblock %}