Django Book 翻译
菜单>:
TOC
返回
原文:
One thing to watch out for when using ``locals()`` is that it includes *every* local variable, which may comprise more variables than you actually want your template to have access to. In the previous example, ``locals()`` will also include ``request`` . Whether this matters to you depends on your application.
翻译:
使用 ``locals()`` 时要注意是它将包括 *所有* 的局部变量,组成它的变量可能比你想让模板访问的要多。在前例中, ``locals()`` 还包含了 ``request`` 。对此如何取舍取决你的应用程序。
备注:
译者: