Pass existing rating to stars form element as variable

This commit is contained in:
Mouse Reeve
2021-04-04 09:05:21 -07:00
parent 4c2f1db6a6
commit 521f917d01
2 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@
<input type="hidden" name="book" value="{{ book.id }}">
<input type="hidden" name="privacy" value="public">
{% include 'snippets/form_rate_stars.html' with book=book classes='mb-1 has-text-warning-dark' %}
{% include 'snippets/form_rate_stars.html' with book=book classes='mb-1 has-text-warning-dark' default_rating=book|user_rating:request.user %}
<div class="field has-addons hidden">
<div class="control">