Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#4266 closed (fixed)

[unicode] str2smart_str

Reported by: Thomas Güttler <hv@…> Owned by: mtredinnick
Component: Uncategorized Version: master
Severity: Keywords: unicode admin
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Hi,

here is a small patch to django/contrib/admin/templatetags/admin_list.py

Attachments (1)

admin_list_smart_str.diff (951 bytes) - added by Thomas Güttler <hv@…> 8 years ago.

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by Thomas Güttler <hv@…>

comment:1 Changed 8 years ago by mtredinnick

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from jacob to mtredinnick
  • Patch needs improvement unset
  • Summary changed from unicode branch: str2smart_str to [unicode] str2smart_str
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 8 years ago by mtredinnick

Thomas: what would be an example of how to test this change? In other words, if I don't apply the patch, what is a way to cause the admin interface to break? I can't immediately work out how to execute that piece of code.

I have a feeling it's not fixing the real cause of the problem, because html.escape() is already calling smart_unicode() on its input. So I suspect the solution might be to remove the str() call altogether on that line and just use escape(field_val).

comment:3 Changed 8 years ago by mtredinnick

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

(In [5200]) unicode: Adjusted the admin interface to handle unicode strings. May still need
some tweaking, but the bulk of it should be correct. Fixed #4266.

comment:4 Changed 8 years ago by Thomas Güttler <hv@…>

Thank you Malcolm. Your changes work for me.

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