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<uidb36>[0-9A-Za-z]+)-(?P<key>.+)/$", 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 %} - - <h1>{% trans "Change Password" %}</h1> - - <form method="POST" action="{% url 'account_change_password' %}" class="password_change"> - {% csrf_token %} - {{ form|crispy }} - <button type="submit" class="btn btn-primary" name="action">{% trans "Change Password" %}</button> - {% if enable_pwd_forgot %} - <a href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a> - {% endif %} - </form> -{% endblock %}