Opened 8 years ago

Closed 7 years ago

#6951 closed (fixed)

edit_inline lazy translation fails in history log.

Reported by: michiel_1981 Owned by: nobody
Component: contrib.admin Version: master
Severity: Keywords: nfa-fixed
Cc: Triage Stage: Fixed on a branch
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


When using edit_inline and object uses a lazy translation for model names and/or field names.
History will show code below instead of field names and/or the model name.

<django.utils.functional.__proxy__ object at 0x8ad760c> for <django.utils.functional.__proxy__ object at 0x8aff06c>

Example, not working just showing setup of inline and ugettext_lazy use.

from django.db import models
from django.utils.translation import ugettext_lazy as _

class Parent(models.Model):
    Regular object
    class Admin:

class Inline(models.Model):
    Inline object related to parent
    parent = models.ForeignKey(Parent, edit_inline=models.STACKED)
    note = models.CharField(_("note"), max_length=100)

    class Meta:
        verbose_name = _("Inline item")
        verbose_name_plural = _("Inline Items")

Change History (5)

comment:1 Changed 8 years ago by michiel_1981

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

failed to say which Django Revision: 7397

comment:2 Changed 8 years ago by Karen Tracey <kmtracey@…>

Whatever is causing this, like #6853, appears to not affect newforms-admin. That is, I can recreate this problem on trunk admin, but not on newforms-admin with the patch for #6117. So when change history is implemented in newforms-admin, it won't be subject to this problem. But it isn't quite "fixed in a branch" yet sine #6117 is still open.

comment:3 Changed 7 years ago by Karen Tracey <kmtracey@…>

  • Triage Stage changed from Unreviewed to Fixed on a branch

#6117 is complete so this is now really fixed on a branch.

comment:4 Changed 7 years ago by Karen Tracey <kmtracey@…>

  • Keywords nfa-fixed added

comment:5 Changed 7 years ago by brosner

  • Resolution set to fixed
  • Status changed from new to closed

This is no longer a problem since the merge of newforms-admin in [7967].

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