Django:Admin后台网页标题和站点名称的修改
需要修改app的admin.py文件
#修改index的admin.py文件
from django.contrib import admin
from index.models import *
# Register your models here
class ProductAdmin(admin.ModelAdmin):
list_display = ['id', 'name', 'weight', 'size', 'type' ]
admin.site.register(Product, ProductAdmin)
#修改网页title和站点header。
admin.site.site_title = "MyDjango后台管理"
admin.site.site_header = "MyDjango"