0

したい

{% for user_id, x, y in information %}
    {% if it is the first time that user_id is different from the previous iteration %}
        do something
    {% elseif user_id is different from the user_id in the previous iteration %}
        do something
    {% endif %}

誰でも助けることができます。ありがとう!!!

4

1 に答える 1

2

を探してい{% ifchanged %}ます。こちらをご覧ください: https://docs.djangoproject.com/en/dev/ref/templates/builtins/#ifchanged

于 2013-08-29T19:49:56.607 に答える