Opened 17 years ago

Closed 16 years ago

#6951 closed (fixed)

edit_inline lazy translation fails in history log.

Reported by: Michiel Owned by: nobody
Component: contrib.admin Version: dev
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: no UI/UX: no

Description

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 models.py, 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:
        pass

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 by Michiel, 17 years ago

failed to say which Django Revision: 7397

comment:2 by Karen Tracey <kmtracey@…>, 17 years ago

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 by Karen Tracey <kmtracey@…>, 16 years ago

Triage Stage: UnreviewedFixed on a branch

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

comment:4 by Karen Tracey <kmtracey@…>, 16 years ago

Keywords: nfa-fixed added

comment:5 by Brian Rosner, 16 years ago

Resolution: fixed
Status: newclosed

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