#19413: [model].__str__() disagrees with __unicode__() using python3 / 
django1.5b1
-----------------------------------+--------------------------------------
     Reporter:  xanthraxoid@…      |                    Owner:  nobody
         Type:  Bug                |                   Status:  closed
    Component:  Python 3           |                  Version:  1.5-beta-1
     Severity:  Normal             |               Resolution:  invalid
     Keywords:  str unicode admin  |             Triage Stage:  Unreviewed
    Has patch:  0                  |      Needs documentation:  0
  Needs tests:  0                  |  Patch needs improvement:  0
Easy pickings:  0                  |                    UI/UX:  0
-----------------------------------+--------------------------------------
Changes (by aaugustin):

 * status:  new => closed
 * needs_better_patch:   => 0
 * resolution:   => invalid
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 The tutorial is currently written for Python 2 only. The differences
 between Python 2 and 3 aren't the first thing a beginner should be exposed
 to, and it's still too early for a Python 3-only tutorial.

 If you're targeting Pyhon 3 only, define `__str__`. There's no such thing
 as `__unicode__` methods in Python 3.

 If you're targeting Python 2 and 3, look at the Python 3 docs and
 specifically the `@python_2_unicode_compatible` decorator.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19413#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to