/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/django/contrib/admin/templates/admin

目录下,有个叫

base_site.html的文件,打开并把Django administration去掉即可

{% extends "admin/base.html" %}

{% block title %}{{ title }} | {{ site_title|default:_('Django site admin') }}{% endblock %}

{% block branding %}
<h1 id="site-name"><a href="{% url 'admin:index' %}">{{ site_header|default:_('Django Administration') }}</a></h1>
{% endblock %} {% block nav-global %}{% endblock %}

把{{ site_header|default:_('Django Administration') }} 替换掉

{% extends "admin/base.html" %}

{% block title %}{{ title }} | {{ site_title|default:_('Django site admin') }}{% endblock %}

{% block branding %}
<h1 id="site-name"><a href="{% url 'admin:index' %}">广州XX贸易有限公司</a></h1>
{% endblock %} {% block nav-global %}{% endblock %}

其中sites.py,是django的源码文件之一,

class AdminSite(object):
"""
An AdminSite object encapsulates an instance of the Django admin application, ready
to be hooked in to your URLconf. Models are registered with the AdminSite using the
register() method, and the get_urls() method can then be used to access Django view
functions that present a full admin interface for the collection of registered
models.
""" # Text to put at the end of each page's <title>.
site_title = ugettext_lazy('Django site admin') # Text to put in each page's <h1>.
site_header = ugettext_lazy('Django administration') # Text to put at the top of the admin index page.
index_title = ugettext_lazy('Site administration') # URL for the "View site" link at the top of each admin page.
site_url = '/' _empty_value_display = '-' login_form = None
index_template = None
app_index_template = None
login_template = None
logout_template = None
password_change_template = None
password_change_done_template = None

# Text to put at the end of each page's <title>.

site_title = ugettext_lazy('Django site admin')

# Text to put in each page's <h1>.

site_header = ugettext_lazy('Django administration')

# Text to put at the top of the admin index page.

index_title = ugettext_lazy('Site administration')

即可修改admin的界面内容

怎么把顶部的Django administration去掉!!的更多相关文章

  1. 修改 Django Administration

    只需要在django项目下的APP下的admin.py重写以下几个变量即可,不需要改django源码 from django.contrib import adminadmin.site.site_t ...

  2. 【Django】搭建Django administration并登录

    Python自带一个后台管理系统,这个后台管理系统搭建与登陆呢? 新建项目Django_Admin 文件结构目录如下: 创建APP 在pycharm下方的terminal终端中输入命令: python ...

  3. 编写你的第一个 Django 程序 第2部分

    原地址:http://django-chinese-docs.readthedocs.org/en/latest/intro/tutorial02.html 本教程上接 教程 第1部分 . 我们将继续 ...

  4. Django 2.0.1 官方文档翻译: 编写你的第一个 Django app,第七部分(Page 12)

    编写你的第一个 Django app,第七部分(Page 12)转载请注明链接地址 本节教程承接第六部分(page 11)的教程.我们继续开发 web-poll应用,并专注于自定义django的自动生 ...

  5. 利用django创建一个投票网站(二)

    创建你的第一个 Django 项目, 第二部分 这一篇从第一部分(zh)结尾的地方继续讲起.本节我们将继续写 Web 投票应用,并主要关注 Django 提供的自动生成的管理页面(admin site ...

  6. “全能”选手—Django 1.10文档中文版Part3

    Django 1.10官方文档的入门教程已经翻译完毕,后续的部分将不会按照顺序进行翻译,而是挑重点的先翻译. 有兴趣的可以关注我的博客. 第一部分传送门 第二部分传送门 第四部分传送门 3.2 模型和 ...

  7. 实战Django:官方实例Part2

    我们接着Part1部分往下讲.我们在part1中启动服务器后,并没有在管理页面中发现新添加的Polls应用,怎么办捏? 7.在管理界面中显示Question 只要注册一下这个应用就可以了.编辑poll ...

  8. Part 7:自定义admin站点--Django从入门到精通系列教程

    该系列教程系个人原创,并完整发布在个人官网刘江的博客和教程 所有转载本文者,需在顶部显著位置注明原作者及www.liujiangblog.com官网地址. Python及Django学习QQ群:453 ...

  9. Django admin 组件 原理分析与扩展使用 之 sites.py (一)

    一 . 前言 Django 提供了admin 组件 为项目提供基本的管理后台功能(对数据表的增删改查). 本篇文章通过 admin源码 简单分析admin 内部原理 ,扩展使用方式,为以后进行定制和自 ...

随机推荐

  1. oracle 10g函数大全--转换函数

    chartorowid(c1) [功能]转换varchar2类型为rowid值 [参数]c1,字符串,长度为18的字符串,字符串必须符合rowid格式 [返回]返回rowid值 [示例] SELECT ...

  2. window安装mysql5.7.11

    1.到mysql官网(http://dev.mysql.com/downloads/mysql/)下载压缩包,我的是win7 64位的,根据自己的系统进行下载 2.解压到自己的目录,我的是 E:\so ...

  3. jbpm4(参数设置)

    1.processDefinition.getDescription() <process name="task_test_2" xmlns="http://jbp ...

  4. Selenium webdriver Java 操作IE浏览器

    V1.0版本:直接新建WebDriver使用 import org.openqa.selenium.WebDriver; import org.openqa.selenium.ie.InternetE ...

  5. 《暗黑世界V1.6》服务器代码执行图

    <暗黑世界V1.6>服务器代码执行图 (原文地址:http://www.9miao.com/forum.php?mod=viewthread&tid=44016&highl ...

  6. Unity3D研究院之脚本生成Android Google Project

    一般安卓自动化打包直接会生成个APK出来,但是我不想生成APK,我想生成Eclipse项目. 然后在自动化完成后面的打包工作.     1 2 3 4 5 6 7 8 9 10 11 using Un ...

  7. jQuery (DOM篇)

    1.DOM节点的创建 创建元素节点: 常见的就是直接把这个节点的结构给通过HTML标记字符串描述出来,通过$()函数处理,$("html结构") $("<div&g ...

  8. 【Excle】二维表转化为一维表

    现在我们想做如下操作: 想把表1的数据转化为表2的数据,那么我们只需要如下这段代码即可解决需求 Sub 转置() Dim i%, arr arr = Application.InputBox(&quo ...

  9. c++ vector容器的使用,序列倒叙reverse(),容器底部插入一个数值push_back()

    问题:程序实现将que[i]添加到que2最后,再将que2反转输出. 例如: 输入 4 1 2 3 4 输出 4 2 1 3 #include<iostream> #include< ...

  10. Mac OS X中配置Apache后提示You don't have permission to access / on this server

    根据这篇博客http://www.cnblogs.com/snandy/archive/2012/11/13/2765381.html,在mac系统中,配置的apache,配置完成后,提示 You d ...