Django Book 翻译
菜单>:
TOC
返回
原文:
The idiom of retrieving the ``Site`` object for the value of ``settings.SITE_ID`` is quite common, so the ``Site`` models manager (``Site.objects`` ) has a ``get_current()`` method. This example is equivalent to the previous one:
翻译:
从 ``Site`` 对象中获取 ``settings.SITE_ID`` 值的做法比较常见,因此 ``Site`` 模型管理器 (``Site.objects`` ) 具备一个 ``get_current()`` 方法。下面的例子与前一个是等效的:
备注:
译者: