Django Book 翻译
菜单>:
TOC
返回
原文:
But theres a problem with ``CurrentTimeNode2`` : the variable name ``current_time`` is hard-coded. This means youll need to make sure your template doesnt use ``{{ current_time }}`` anywhere else, because ``{% current_time2 %}`` will blindly overwrite that variables value.
翻译:
但是 ``CurrentTimeNode2`` 有一个问题: 变量名 ``current_time`` 是硬编码的。这意味着你必须确定你的模板在其它任何地方都不使用 ``{{ current_time }}`` ,因为 ``{% current_time2 %}`` 会盲目的覆盖该变量的值。
备注:
译者: