Django Book 翻译
菜单>:
TOC
返回
原文:
It would be inefficient and redundant to implement this signup-processing code twice, so the sites use the same code behind the scenes. But the Thank you for your subscription notice needs to be different for each site. By using ``Site`` objects, we can abstract the thank-you notice to use the values of the current sites ``name`` (e.g., ``'LJWorld.com'`` ) and ``domain`` (e.g., ``'www.ljworld.com'`` ).
翻译:
把这个注册过程的代码实现两遍显然是低效、多余的,因此两个站点在后台使用相同的代码。但感谢注册的通知在两个网站中需要不同。通过使用 ``Site`` 对象,我们通过使用当前站点的 ``name`` (例如 ``'LJWorld.com'`` )和 ``domain`` (例如 ``'www.ljworld.com'`` )可以把感谢通知抽提出来。
备注:
译者: