[unicode] Unicode models
|Reported by:||Owned by:||Adrian Holovaty|
|Component:||Database layer (models, ORM)||Version:||master|
|Cc:||Malcolm Tredinnick, Maniac@…||Triage Stage:||Unreviewed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Models has to output their data from __unicode__ method, not __str__ as it is used now. I have a working code that does roughly this: changes current __str__ to __unicode__ and defines a __str__ as unicode(self).encode(settings.DEFAULT_CHARSET).
The big part is documenting the change: users should use __unicode__ instead of __str__ for their model classes. If there's no principal objections I could make a patch.