Because of the way blocks are arranged it's not clear the notice is about
`__unicode__` vs `__str__` or and not ''other model instance methods'' in
general.
Since the tutorial is oriented toward Python 3 I would suggest we reorder
the doc blocks as follow:
1. `__str__`;
2. `__str__` vs `__unicode__` notice;
3. `__unicode__`.
It should make it clear the notice is about interaction of both methods
and express our preference toward Python 3.
--
Ticket URL: <https://code.djangoproject.com/ticket/25462>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by charettes):
Actually this whole section would benefit of a small rewrite with Python 3
in mind.
--
Ticket URL: <https://code.djangoproject.com/ticket/25462#comment:1>
* stage: Unreviewed => Accepted
Comment:
I think I would remove the heading/and method annotation for `__unicode__`
and leave it mentioned in a note box under `__str__` with a title like
"Using Python 2?".
--
Ticket URL: <https://code.djangoproject.com/ticket/25462#comment:2>
Comment (by charettes):
Replying to [comment:2 timgraham]:
> I think I would remove the heading/and method annotation for
`__unicode__` and leave it mentioned in a note box under `__str__` with a
title like "Using Python 2?".
Makes sense to me.
--
Ticket URL: <https://code.djangoproject.com/ticket/25462#comment:3>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/5358 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/25462#comment:4>
* stage: Accepted => Ready for checkin
Comment:
LGTM, thanks Tim!
--
Ticket URL: <https://code.djangoproject.com/ticket/25462#comment:5>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"de99f558d806a2a1b30072ec95bc44d412d80dab" de99f558]:
{{{
#!CommitTicketReference repository=""
revision="de99f558d806a2a1b30072ec95bc44d412d80dab"
Fixed #25462 -- Removed Model.__unicode__() in favor of
@python_2_unicode_compatible.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25462#comment:6>
Comment (by Tim Graham <timograham@…>):
In [changeset:"260e9f15fe05226188a63ef8e30fa069e48f2660" 260e9f15]:
{{{
#!CommitTicketReference repository=""
revision="260e9f15fe05226188a63ef8e30fa069e48f2660"
[1.9.x] Fixed #25462 -- Removed Model.__unicode__() in favor of
@python_2_unicode_compatible.
Backport of de99f558d806a2a1b30072ec95bc44d412d80dab from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25462#comment:7>