我正在尝试显示诊所列表,但我一直收到以下错误:
Exception Type: TemplateSyntaxError at /clinics/
Exception Value: Invalid block tag: 'c.name', expected 'empty' or 'endfor'
Run Code Online (Sandbox Code Playgroud)
这是clinicList.html
{% for c in clinics %}
{% c.name %}
{% endfor %}
Run Code Online (Sandbox Code Playgroud)
这是意见
def clinicList(request):
d = getVariables(request,dictionary={'page_name':""})
d.update({'clinics': Clinic.objects.all()})
return render(request, 'm1/clinicList.html', d)
Run Code Online (Sandbox Code Playgroud)
这是url.py
url(r'^clinics/$', views.clinicList, name='clinicList'),
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4623 次 |
| 最近记录: |