Django无效的块标记预期为'空'或'结束'

Jam*_* L. 2 python django

我正在尝试显示诊所列表,但我一直收到以下错误:

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)

jcf*_*wer 8

看起来你应该有 {{ c.name }}