以下代码运行正常,但最近在服务器上显示为奇怪。
views.py
context['data'] = [{'personal_email': 'personal_email@gmail.com', 'office_email': 'office_email@gmail.com'}]
模板
{% for i in data %}
{{ i.personal_email }}
{{ i.office_email }}
{% include 'sample.html' with email=i.personal_email %}
{% include 'sample.html' with email=i.office_email %}
{% endfor %}
我无法在sample.html文件中获得office_email