Django Book 翻译
菜单>:
TOC
返回
原文:
Djangos redirects framework lets you manage redirects easily by storing them in a database and treating them as any other Django model object. For example, you can use the redirects framework to tell Django, Redirect any request to ``/music/`` to ``/sections/arts/music/`` . This comes in handy when you need to move things around on your site; Web developers should do whatever is necessary to avoid broken links.
翻译:
通过将重定向存储在数据库中并将其视为 Django 模型对象,Django 重定向框架让你能够轻松地管理它们。比如说,你可以通过重定向框架告诉Django,把任何指向 ``/music/`` 的请求重定向到 ``/sections/arts/music/`` 。当你需要在站点中移动一些东西时,这项功能就派上用场了——网站开发者应该穷尽一切办法避免出现坏链接。
备注:
译者: