デフォルトの管理パネルの結果リスト (change_list_results.html) をオーバーライドして、各行の ID を追加したいと考えています。<tr>
デフォルトは次のとおりです。
<tbody>
{% for result in results %}
{% if result.form.non_field_errors %}
<tr><td colspan="{{ result|length }}">{{ result.form.non_field_errors }}</td></tr>
{% endif %}
<tr class="{% cycle 'row1' 'row2' %}">{% for item in result %}{{ item }}{% endfor %}</tr>
{% endfor %}
</tbody>
私はを頂きたい:
<tbody>
{% for result in results %}
{% if result.form.non_field_errors %}
<tr><td colspan="{{ result|length }}">{{ result.form.non_field_errors }}</td></tr>
{% endif %}
<tr class="{% cycle 'row1' 'row2' %}" id="{{ ID }}">{% for item in result %}{{ item }}{% endfor %}</tr>
{% endfor %}
</tbody>
{{ ID }}
要素 ID を取得するには何を入力すればよいですか?