From aa3cdee73119530cdba51beb052f260369f52484 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Fri, 30 Apr 2021 06:43:43 -0700 Subject: [PATCH] Fixes invalid url breaking change password flow --- bookwyrm/templates/preferences/change_password.html | 2 +- bookwyrm/urls.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bookwyrm/templates/preferences/change_password.html b/bookwyrm/templates/preferences/change_password.html index ab8be7170..9f5b7e8b9 100644 --- a/bookwyrm/templates/preferences/change_password.html +++ b/bookwyrm/templates/preferences/change_password.html @@ -8,7 +8,7 @@ {% endblock %} {% block panel %} -
+ {% csrf_token %}
diff --git a/bookwyrm/urls.py b/bookwyrm/urls.py index 24c80b046..99e51ff3c 100644 --- a/bookwyrm/urls.py +++ b/bookwyrm/urls.py @@ -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\d+)/?$", views.Block.as_view()), re_path(r"^unblock/(?P\d+)/?$", views.unblock),