Opened 17 years ago

Last modified 13 years ago

#4702 closed

gettext_lazy on _meta.app_label doesn't group together in admin — at Version 1

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 Malcolm Tredinnick)

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 (1)

comment:1 by Malcolm Tredinnick, 17 years ago

Description: modified (diff)
Keywords: unicode-branch added
Triage Stage: UnreviewedAccepted

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.

Note: See TracTickets for help on using tickets.
Back to Top