我正在做一个关于模板的 Django 教程。我目前在这个代码:
from django.template import Template, Context
>>> person = {'name': 'Sally', 'age': '43'}
>>> t = Template('{{ person.name }} is {{ person.age }} years old.')
>>> c = Context({'person': person})
>>> t.render(c)
u'Sally is 43 years old.'
我不明白的是这一行:
c = Context({'person': person})
在这个例子中,这两个变量都需要被称为 person 还是只是随机的?
'person'
指的是什么,指的是什么person
?