django admin 中文显示设置汇总(持续完善ing...)

开发环境

  • django: 1.11.8 django admin 官方文档

设置配置

settings.py配置

# settings.py

## 中文显示
LANGUAGE_CODE = 'zh-Hans'            
TIME_ZONE = 'Asia/Shanghai'

admin.py配置

# admin.py

admin.site.site_header = '后台管理系统'    
admin.site.site_title = '后台管理'
admin.site.index_title = '后台站点管理'

apps.py配置

# apps.py

from django.apps import AppConfig


class AccountsConfig(AppConfig):
    name = 'accounts'
    verbose_name = u"用户信息管理"    # admin模块标题

models.py配置

# models.py

class Department(models.Model):
    department_name = models.CharField(max_length=40, verbose_name='部门名称')

    class Meta:
        verbose_name_plural = '部门'    # admin中显示

 

 

你可能感兴趣的:(django)