是否可以在 django 管理站点中更改模型名称? [英] Is it possible to change the model name in the django admin site?
本文介绍了是否可以在 django 管理站点中更改模型名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在翻译一个 django 应用程序,我还想翻译 django 管理站点的主页.
I am translating a django app and I would like to translate also the homepage of the django admin site.
在此页面上列出了应用程序名称和模型类名称.我想翻译模型类名称,但我没有找到如何为模型类提供用户友好的名称.
On this page are listed the application names and the model class names. I would like to translate the model class name but I don't find how to give a user-friendly name for a model class.
有人知道怎么做吗?
推荐答案
看Meta
选项 verbose_name
和 verbose_name_plural
,两者都是可翻译的.
Look at the Meta
options verbose_name
and verbose_name_plural
, both of which are translatable.
这篇关于是否可以在 django 管理站点中更改模型名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文