を含めると、同じページにpaginator複数印刷されます。paginatorに含めているからですforloop。この問題を解決するにはどうすればよいですか? 助けてください
----------------------
{% autopaginate recipes %}
{% for recipe in recipes %}
{{ forloop.counter }}
{% endfor %}
-----------
これが私の完全なコードです。
{% with followers=current_user.get_profile.get_following.all %}
{% for follower in followers %}
{% with recipes=follower.recipe_set.all %}
{% for recipe in recipes %}
{{ forloop.counter }}
{% endfor %}
{% endwith %}
{% endfor %}
{% endwith %}
結果 - > 1 2 3 1 2 3 ...... 50. である必要があります53。だから私は簡単に使うことができますpaginator
ありがとう