#4702 closed (fixed)
gettext_lazy on _meta.app_label doesn't group together in admin
| Reported by: | anonymous | Owned by: | Adrian Holovaty |
|---|---|---|---|
| Component: | contrib.admin | Version: | dev |
| Severity: | Keywords: | unicode-branch | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | 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.
Example:
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 by , 18 years ago
| Description: | modified (diff) |
|---|---|
| Keywords: | unicode-branch added |
| Triage Stage: | Unreviewed → Accepted |
comment:2 by , 18 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Fixed description formatting.
This has been fixed on the UnicodeBranch (because *_lazy() functions can now be checked for equality). I will close this ticket when that branch is merged into trunk.