django modify the application name and the name of the background

Modify the background top titles
app / admin.py set

admin.site.site_title = "intelligent dialogue robot Admin" 
admin.site.site_header = "robots Admin smart AI"

Name of the application to modify


The first step: modify file apps.py
increase under the name row
verbose_name = u "application name"

  

Step two: Modify the file __init__.py, add the following:
default_app_config = "xxx.apps.BlogConfig"

Modify the table name

 
Meta class: 
verbose_name_plural = U "Chinese name"

Modify the field name

Increase parameter verbose_name = 'Chinese' in the definition

ctitle = models.CharField (max_length = 20, verbose_name = 'Category Name')

  

 

Guess you like

Origin www.cnblogs.com/spidernyp/p/12466648.html