Handle unicode/str cast operators.

Review Request #4920 — Created Nov. 8, 2013 and submitted

Information

Review Board
master

Reviewers

Handle unicode/str cast operators.

A few of our objects defined __str__ and/or __unicode__ methods. This presents
some complications for porting to python 3, since str has different meanings.

Django provides a decorator, @python_2_unicode_compatible, whereby you define
__str__ using python 3 semantics (i.e. it returns unicode), and when running
with python 2, it will rename that to __unicode__ and make __str__ call that
and encode to utf-8.

  • Ran unit tests
  • Checked list displays in the admin
david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (52b6439).
Loading...