Improves query efficiency for shelve buttons
About 50 fewer queries (yikes)
This commit is contained in:
parent
368d2cd716
commit
3d3ab6433e
6 changed files with 9 additions and 8 deletions
|
@ -5,7 +5,7 @@
|
|||
<div class="select is-small mt-1 mb-3">
|
||||
<select name="{{ book.id }}" aria-label="{% blocktrans with book_title=book.title %}Have you read {{ book_title }}?{% endblocktrans %}">
|
||||
<option disabled selected value>Add to your books</option>
|
||||
{% for shelf in request.user.shelf_set.all %}
|
||||
{% for shelf in user_shelves %}
|
||||
<option value="{{ shelf.id }}">{{ shelf.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue