Fixes goal url

This commit is contained in:
Mouse Reeve 2021-09-22 12:16:51 -07:00
parent dbfc1a28bb
commit fa6e5605d1
2 changed files with 2 additions and 2 deletions

View file

@ -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 }}">

View file

@ -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",
),