我正在学习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
又指什么?