Django Book 翻译
菜单>:
TOC
返回
原文:
This is an improvement, but, evaluating the conciseness of this code, we have to admit were now almost overdosing on the *other* end of the spectrum. Weve removed redundancy in data (our template variables) at the cost of adding redundancy in code (in the ``processors`` call). Using context processors doesnt save you much typing if you have to type ``processors`` all the time.
翻译:
虽然这是一种改进,但是,请考虑一下这段代码的简洁性,我们现在不得不承认的是在 *另外* 一方面有些过分了。我们以代码冗余(在 ``processors`` 调用中)的代价消除了数据上的冗余(我们的模板变量)。由于你不得不一直键入 ``processors`` ,所以使用context处理器并没有减少太多的打字次数。
备注:
译者: