Django Book 翻译
菜单>:
TOC
返回
原文:
Djangos ``get_absolute_url()`` convention is nice for getting your objects URLs without the domain name, but in some cases you might want to display the full URL with ``http://`` and the domain and everything for an object. To do this, you can use the sites framework. Heres a simple example:
翻译:
Django 的 ``get_absolute_url()`` 约定对与获取不带域名的对象 URL 非常理想,但在某些情形下,你可能想显示某个对象带有 ``http://`` 和域名以及所有部分的完整 URL 。要完成此工作,你可以使用多站点框架。下面是个简单的例子:
备注:
译者: