Django

Code

Ticket #4702 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

gettext_lazy on _meta.app_label doesn't group together in admin

Reported by: anonymous Assigned to: adrian
Milestone: Component: Admin interface
Version: SVN Keywords: unicode-branch
Cc: Triage Stage: Accepted
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description (Last modified by mtredinnick)

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.

Attachments

Change History

06/27/07 02:45:12 changed by mtredinnick

  • description changed.
  • needs_better_patch changed.
  • needs_tests changed.
  • keywords set to unicode-branch.
  • needs_docs changed.
  • stage changed from Unreviewed to Accepted.

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.

07/04/07 07:11:05 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

(In [5609]) Merged Unicode branch into trunk (r4952:5608). This should be fully backwards compatible for all practical purposes.

Fixed #2391, #2489, #2996, #3322, #3344, #3370, #3406, #3432, #3454, #3492, #3582, #3690, #3878, #3891, #3937, #4039, #4141, #4227, #4286, #4291, #4300, #4452, #4702


Add/Change #4702 (gettext_lazy on _meta.app_label doesn't group together in admin)




Change Properties
Action