forked from mirrors/bookwyrm
Fixes goal url
This commit is contained in:
parent
dbfc1a28bb
commit
fa6e5605d1
2 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
{% load i18n %}
|
||||
<form method="post" name="goal" action="{{ request.user.local_path }}/goal/{{ year }}">
|
||||
<form method="post" name="goal" action="{% url 'user-goal' request.user.localname year %}">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="year" value="{% if goal %}{{ goal.year }}{% else %}{{ year }}{% endif %}">
|
||||
<input type="hidden" name="user" value="{{ request.user.id }}">
|
||||
|
|
|
@ -291,7 +291,7 @@ urlpatterns = [
|
|||
re_path(r"^unshelve/?$", views.unshelve),
|
||||
# goals
|
||||
re_path(
|
||||
rf"{USER_PATH}/goal/(?P<year>\d{4})/?$",
|
||||
rf"{LOCAL_USER_PATH}/goal/(?P<year>\d+)/?$",
|
||||
views.Goal.as_view(),
|
||||
name="user-goal",
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue