mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
remove unneeded override
This commit is contained in:
parent
dbc58b299c
commit
b281241607
@ -37,7 +37,7 @@ from rest_framework.documentation import include_docs_urls
|
|||||||
|
|
||||||
from .views import auth_request
|
from .views import auth_request
|
||||||
from .views import IndexView, SearchView, DatabaseStatsView
|
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 CurrencyRefreshView
|
||||||
from .views import AppearanceSelectView, SettingCategorySelectView
|
from .views import AppearanceSelectView, SettingCategorySelectView
|
||||||
from .views import DynamicJsView
|
from .views import DynamicJsView
|
||||||
@ -166,7 +166,6 @@ urlpatterns = [
|
|||||||
# overrides of urlpatterns
|
# overrides of urlpatterns
|
||||||
url(r'^accounts/email/', CustomEmailView.as_view(), name='account_email'),
|
url(r'^accounts/email/', CustomEmailView.as_view(), name='account_email'),
|
||||||
url(r'^accounts/social/connections/', CustomConnectionsView.as_view(), name='socialaccount_connections'),
|
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/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
|
url(r'^accounts/', include('allauth.urls')), # included urlpatterns
|
||||||
]
|
]
|
||||||
|
@ -27,7 +27,7 @@ from djmoney.contrib.exchange.models import ExchangeBackend, Rate
|
|||||||
from allauth.account.forms import AddEmailForm
|
from allauth.account.forms import AddEmailForm
|
||||||
from allauth.socialaccount.forms import DisconnectForm
|
from allauth.socialaccount.forms import DisconnectForm
|
||||||
from allauth.account.models import EmailAddress
|
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 allauth.socialaccount.views import ConnectionsView
|
||||||
|
|
||||||
from common.settings import currency_code_default, currency_codes
|
from common.settings import currency_code_default, currency_codes
|
||||||
@ -850,13 +850,6 @@ class CustomConnectionsView(AllauthOverrides, ConnectionsView):
|
|||||||
success_url = reverse_lazy("settings")
|
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):
|
class CustomPasswordResetFromKeyView(PasswordResetFromKeyView):
|
||||||
"""
|
"""
|
||||||
Override of allauths PasswordResetFromKeyView to always show the settings but leave the functions allow
|
Override of allauths PasswordResetFromKeyView to always show the settings but leave the functions allow
|
||||||
|
@ -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 %}
|
|
Loading…
Reference in New Issue
Block a user