基于 Django1.10 文档的深入学习(4)—— models.py 之 class Meta

class Meta
在其 model 内部提供模型的所有可能的元数据选项


verbose_name

Options.verbose_name
A human-readable name for the object, singular:

`verbose_name = “pizza”

If this isn’t given, Django will use a munged version of the class name: CamelCase becomes camel case.


verbose_name_plural

Options.verbose_name_plural
The plural name for the object:

verbose_name_plural = “stories”

If this isn’t given, Django will useverbose_name + "s".

你可能感兴趣的:(Django)