Fix book ordering.
authorRadek Czajka <rczajka@rczajka.pl>
Mon, 31 Jan 2022 15:35:46 +0000 (16:35 +0100)
committerRadek Czajka <rczajka@rczajka.pl>
Mon, 31 Jan 2022 15:35:46 +0000 (16:35 +0100)
src/catalogue/templates/catalogue/2021/book_detail.html

index c765100..f7261ec 100644 (file)
@@ -68,7 +68,7 @@
             <li><span>Rodzaj:</span> {% for tag in book.kinds %}<a href="{{ tag.get_absolute_url }}">{{ tag.name|lower }}</a> {% endfor %}</li>
             <li><span>Gatunek:</span> {% for tag in book.genres %}<a href="{{ tag.get_absolute_url }}">{{ tag.name|lower }}</a> {% endfor %}</li>
           </ul>
             <li><span>Rodzaj:</span> {% for tag in book.kinds %}<a href="{{ tag.get_absolute_url }}">{{ tag.name|lower }}</a> {% endfor %}</li>
             <li><span>Gatunek:</span> {% for tag in book.genres %}<a href="{{ tag.get_absolute_url }}">{{ tag.name|lower }}</a> {% endfor %}</li>
           </ul>
-          {% if book.parent or book.children.all %}
+          {% if book.parent or book.get_children %}
             <ul class="l-aside__zbiory">
               {% if book.parent %}
                 {% for b in book.ancestors %}
             <ul class="l-aside__zbiory">
               {% if book.parent %}
                 {% for b in book.ancestors %}
@@ -81,7 +81,7 @@
                     {% if b == book %}
                       <strong>{{ b.title }}</strong>
                       <ul>
                     {% if b == book %}
                       <strong>{{ b.title }}</strong>
                       <ul>
-                        {% for c in book.children.all %}
+                        {% for c in book.get_children %}
                           <li>
                             <a href="{{ c.get_absolute_url }}">{{ c.title }}</a>
                           </li>
                           <li>
                             <a href="{{ c.get_absolute_url }}">{{ c.title }}</a>
                           </li>
                 <li>
                   <strong>{{ book.title }}</strong>
                   <ul>
                 <li>
                   <strong>{{ book.title }}</strong>
                   <ul>
-                    {% for c in book.children.all %}
+                    {% for c in book.get_children %}
                       <li>
                         <a href="{{ c.get_absolute_url }}">{{ c.title }}</a>
                       </li>
                       <li>
                         <a href="{{ c.get_absolute_url }}">{{ c.title }}</a>
                       </li>