Django Book 翻译
菜单>:
TOC
返回
原文:
The admin site finds the Django administration header by looking for the template ``admin/base_site.html`` . By default, this template lives in the Django admin template directory, ``django/contrib/admin/templates`` , which you can find by looking in your Python ``site-packages`` directory, or wherever Django was installed. To customize this ``base_site.html`` template, copy that template into an ``admin`` subdirectory of whichever directory youre using in ``TEMPLATE_DIRS`` . For example, if your ``TEMPLATE_DIRS`` includes ``"/home/mytemplates"`` , then copy ``django/contrib/admin/templates/admin/base_site.html`` to ``/home/mytemplates/admin/base_site.html`` . Dont forget that ``admin`` subdirectory.
翻译:
管理站点的头部区域在模板 ``admin/base_site.html`` 里。缺省情况下,这个模板在 Django管理模板目录 ``django/contrib/admin/templates`` 里,你可以在Django的安装 目录找到它,例如Python的 ``site-packages`` 目录或者你安装的其他目录。要自定义 这个 ``base_site`` 模板,把这个模板拷贝到你的模板目录下的 ``admin`` 子目录。 例如,假定你的模板目录是 ``"/home/mytemplates"`` ,拷贝 ``django/contrib/admin/templates/admin/base_site.html`` 到 ``/home/mytemplates/admin/base_site.html`` 。不要忘了有 ``admin`` 子目录。
备注:
译者: