Django Book 翻译
菜单>:
TOC
返回
原文:
A context is represented in Django by the ``Context`` class, which lives in the ``django.template`` module. Its constructor takes one optional argument: a dictionary mapping variable names to variable values. Call the ``Template`` objects ``render()`` method with the context to fill the template:
翻译:
context在Django里表现为 ``Context`` 类,在 ``django.template`` 模块里。 它的构造函数有一个可选参数:一个字典(映射变量和它们的值)。调用 ``Template`` 对象 的 ``render()`` 方法并传递context来填充模板:
备注:
译者: