1.标题
setting.py文件:
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
修改:
LANGUAGE_CODE = 'zh-Hans'
TIME_ZONE = 'Asia/Shanghai'
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