初心者の質問: 私は、extra_Contextviews.py で定義されたメソッドからレンダリングする辞書を持っています。
私の見解:
 extra_context = {
    'comment': comment
    }
return direct_to_template(request, 'events/comment_detail.html', extra_context)
を印刷するとcomment、次のように印刷されます。
[{'comment': u'first', 'user': 2}, {'comment': u'second', 'user': 2}]
この辞書をテンプレートに渡したいです。私はこの次のコードで試しました:
       <tbody>
            {% for obj in comment %}
                {% for key,val in obj.items %}
             <tr class="{% cycle 'odd' 'even' %}">
                <td> {{val}}</td>
            </tr>
                {% endfor %}
            {% endfor %}
       </tbody>
それは印刷します:
first
2
second
2
私はこのようにしたい:
first  2
second 2
..等々
上記のようにするには何を追加すればよいですか?
更新しました!
 def comment_detail(request, object_id):
     comment_obj = EventComment.objects.filter(event = object_id)
     comment = comment_obj.values('comment','user')
     extra_context = {
         'comment': comment
         }
     return direct_to_template(request, 'events/comment_detail.html', extra_context)
comment_detail.html
<form action="" method="POST">
<table>
    <thead>
        <tr><th>{% trans "Comments" %}</th><th>{% trans "Timestamp "%}<th>{% trans "User" %}</th></tr>
    </thead>
    <tbody>
        {% if comments %}
    {% for com in comment %}
                <td> {{com.comment}}</enter code heretd>
                <td> {{com.user}}</td>
    {% endfor %}
    {% else %}
     <td> No comments </td>
     {% endif %}
    </tr>  
    </tbody>
</table>
 </form>