1.标题

setting.py文件:

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

Django 改变xadmin后台英文为中文-LMLPHP

修改:

LANGUAGE_CODE = 'zh-Hans'

TIME_ZONE = 'Asia/Shanghai'

Django 改变xadmin后台英文为中文-LMLPHP

2.表名:
class Meta:
verbose_name = '栏目'
verbose_name_plural = '栏目'
3.app在Admin后台显示的名称
只需要在应用的__init__.py里面进行修改即可
from django.apps import AppConfig
import os default_app_config = 'news.PrimaryBlogConfig' VERBOSE_APP_NAME = u"新闻" def get_current_app_name(_file):
return os.path.split(os.path.dirname(_file))[-1] class PrimaryBlogConfig(AppConfig):
name = get_current_app_name(__file__)
verbose_name = VERBOSE_APP_NAME
05-11 03:55