Не удалось разобрать остаток: '(0,10)' из 'range(0,10)' с помощью python

{% for j in range(0,10) %}
                 <div class="titre">
                   <h3>{{ titre[j] }} </h3>
                 </div>

                 <div class="resume">
                     <p> The background-image is repeated as much as possible without clipping.
                         The first and last image is pinned to either side of the element, and whitespace is distributed evenly between the images</p>
                 </div>

                 <div class="date">
                     <p><span style="font-style: italic;font-weight: bold;">date de publication</span>
                         {{ date[j] }} </p>
                 </div>
             {% endfor %}

У меня проблема с моим шаблоном, особенно в {% for j in range(0,10) %}. Я не понимаю, что он посылает ошибку Could not parse the remainder: '(0,10)' from 'range(0,10). вот код ошибки и сообщение, которое он выводит внизу

Спасибо всем ребятам. Я обнаружил, что django не поддерживает range(10) и я заменил эту часть кода на {% for j in '0123456789'|make_list %}. и это работает очень хорошо. спасибо за ссылки

Вернуться на верх