optimized queries
This commit is contained in:
		@@ -14,11 +14,11 @@
 | 
			
		||||
        <th onclick="sortTable(3)">Tags</th>
 | 
			
		||||
        <th onclick="sortTable(4)">Added</th>
 | 
			
		||||
    </tr>
 | 
			
		||||
    {% for book in publisher.released.all %}
 | 
			
		||||
    {% for book in books %}
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td><a href="{{ book.get_absolute_url }}">{{ book.title }}</a></td>
 | 
			
		||||
        <td>{{book.author_sort}}</td>
 | 
			
		||||
        <td> {% for rating in book.ratings.all %}
 | 
			
		||||
        <td> {% for rating in book.rating.all %}
 | 
			
		||||
            {{rating}}
 | 
			
		||||
            {% endfor %}
 | 
			
		||||
        </td>
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,7 @@
 | 
			
		||||
    <th onclick="sortTable(3)">Tags</th>
 | 
			
		||||
    <th onclick="sortTable(4)">Added</th>
 | 
			
		||||
  </tr>
 | 
			
		||||
  {% for book in books_list %}
 | 
			
		||||
  {% for book in book_list %}
 | 
			
		||||
  <tr>
 | 
			
		||||
    <td><a href="{{ book.get_absolute_url }}">{{ book.title }}</a></td>
 | 
			
		||||
    <td>{{book.author_sort}}</td>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user