gettext_lazy on _meta.app_label doesn't group together in admin
|Reported by:||anonymous||Owned by:||Adrian Holovaty|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Description (last modified by )
When you apply gettext_lazy on the app_label Meta attribute, it causes the class to ungroup in the admin even if the label is identical to another.
class QuestionSet(models.Model): ...fields... class Meta: app_label = _("Q and A") class Question(models.Model): ...fields... class Meta: app_label = _("Q and A")
This gives you two separate groups called "Q And A" in the admin instead of grouping them together.
Change History (3)
comment:1 Changed 9 years ago by
|Patch needs improvement:||unset|
|Triage Stage:||Unreviewed → Accepted|