通过代码来进行修改
1.admin.py
from django.contrib import admin
from .models import User
from .models import Iotdata
#新加入的包
from django.contrib.admin import AdminSite
from django.utils.translation import ugettext_lazy
admin.site.register(User)
admin.site.register(Iotdata)
#此处更改,相当于创了另一个页面
class MyAdminSite(AdminSite):
#网站标签页标题
site_title = ugettext_lazy('治电科技物联网后台管理')
#网站标题
site_header = ugettext_lazy('ZZES IOT FOR PET')
admin_site = MyAdminSite()
admin_site.register(User)
admin_site.register(Iotdata)
2.urls.py修改
#引入包
from mysite.admin import admin_site
#更改admin的urls
url(r'^admin/', admin_site.urls),