Fixes invalid url breaking change password flow

This commit is contained in:
Mouse Reeve 2021-04-30 06:43:43 -07:00
parent e126c13ff7
commit aa3cdee731
2 changed files with 6 additions and 2 deletions

View file

@ -8,7 +8,7 @@
{% endblock %}
{% block panel %}
<form name="edit-profile" action="/change-password/" method="post" enctype="multipart/form-data">
<form name="edit-profile" action="{% url 'prefs-password' %}" method="post" enctype="multipart/form-data">
{% csrf_token %}
<div class="block">
<label class="label" for="id_password">{% trans "New password:" %}</label>

View file

@ -224,7 +224,11 @@ urlpatterns = [
re_path(r"^hide-goal/?$", views.hide_goal, name="hide-goal"),
# preferences
re_path(r"^preferences/profile/?$", views.EditUser.as_view(), name="prefs-profile"),
re_path(r"^preferences/password/?$", views.ChangePassword.as_view()),
re_path(
r"^preferences/password/?$",
views.ChangePassword.as_view(),
name="prefs-password",
),
re_path(r"^preferences/block/?$", views.Block.as_view()),
re_path(r"^block/(?P<user_id>\d+)/?$", views.Block.as_view()),
re_path(r"^unblock/(?P<user_id>\d+)/?$", views.unblock),