Merge pull request #1019 from bookwyrm-social/change-password-url

Fixes invalid url breaking change password flow
This commit is contained in:
Mouse Reeve 2021-04-30 06:53:30 -07:00 committed by GitHub
commit b4c155f134
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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),