有没有办法可以自动标记所有模型名称和翻译属性,而不在每一个上指定verbose_name / _plural?
每次都这样做感觉不是很干:
class Profile(models.Model):
length = models.IntegerField(_('length'))
weight = models.IntegerField(_('weight'))
favorite_movies = models.CharField(_('favorite movies'), max_length=100)
favorite_quote = models.CharField(_('favorite quote'), max_length=30)
religious_views = models.CharField(_('religious views'), max_length=30)
political_views = models.CharField(_('political views'), max_length=30)
class Meta:
verbose_name = _('profile')
verbose_name_plural = _('profiles')