Opened 15 years ago

Last modified 15 years ago

#12966 closed

Unicode pluralnames doesn`t work well with InlineAdmin — at Initial Version

Reported by: IsakovAN Owned by: nobody
Component: contrib.admin Version: 1.1
Severity: Keywords: unicode
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

contrib/admin/options.py:

change_message.append(_('Added %(name)s "%(object)s".')

% {'name': added_object._meta.verbose_name,

'object': force_unicode(added_object)})

for changed_object, changed_fields in formset.changed_objects:

change_message.append(_('Changed %(list)s for %(name)s "%(object)s".')

% {'list': get_text_list(changed_fields, _('and')),

'name': changed_object._meta.verbose_name,
'object': force_unicode(changed_object)})

for deleted_object in formset.deleted_objects:

change_message.append(_('Deleted %(name)s "%(object)s".')

% {'name': deleted_object._meta.verbose_name,

'object': force_unicode(deleted_object)})

Inline admin caught exception OrdinalNotInRange if XXX_object._meta.verbose_name is UTF-8 text. I have fix that wrapping XXX_object._meta.verbose_name with force_unicode function:
'name': force_unicode(changed_object._meta.verbose_name),

Change History (0)

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