Use url templatetag to load posting urls

This commit is contained in:
Mouse Reeve 2021-10-14 15:56:34 -07:00
parent d5b247b905
commit 1f6f543847
2 changed files with 2 additions and 2 deletions

View file

@ -17,7 +17,7 @@ reply_parent: the Status object this post will be in reply to, if applicable
<form <form
class="is-flex-grow-1{% if not no_script %} submit-status{% endif %}" class="is-flex-grow-1{% if not no_script %} submit-status{% endif %}"
name="{{ type }}" name="{{ type }}"
action="/post/{{ type }}" action="{% url "create-status" type %}"
method="post" method="post"
id="form_{{ type }}_{{ book.id }}{{ reply_parent.id }}" id="form_{{ type }}_{{ book.id }}{{ reply_parent.id }}"
> >

View file

@ -3,7 +3,7 @@
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
<span class="is-sr-only">{% trans "Leave a rating" %}</span> <span class="is-sr-only">{% trans "Leave a rating" %}</span>
<div class="block"> <div class="block">
<form class="hidden-form" name="rate" action="/post/rating" method="POST"> <form class="hidden-form" name="rate" action="{% url 'create-status' 'rating' %}" method="POST">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="user" value="{{ request.user.id }}"> <input type="hidden" name="user" value="{{ request.user.id }}">
<input type="hidden" name="book" value="{{ book.id }}"> <input type="hidden" name="book" value="{{ book.id }}">