Code

Changes between Initial Version and Version 2 of Ticket #19211


Ignore:
Timestamp:
10/30/12 12:47:15 (18 months ago)
Author:
lukeplant
Comment:

Description fixed - you can include literal code by enclosing in backticks, as described on WikiFormatting.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #19211

    • Property Patch needs improvement unset
    • Property Needs tests unset
    • Property Summary changed from 1.5 Tutorial wrong about __unicode__() method for Python 3 to Tutorial must be updated for Python 3
    • Property Needs documentation unset
    • Property Triage Stage changed from Unreviewed to Accepted
  • Ticket #19211 – Description

    initial v2  
    1 When using Python 3.3 and 1.5-alpha-1 (note: underlined unicode() and str() below should have double underscores) 
     1When using Python 3.3 and 1.5-alpha-1. 
    22 
    3 See this section of the tutorial "Why __unicode__() and not __str__()?": https://docs.djangoproject.com/en/1.5/intro/tutorial01/#playing-with-the-api 
     3See this section of the tutorial "Why `__unicode__()` and not `__str__()`?": https://docs.djangoproject.com/en/1.5/intro/tutorial01/#playing-with-the-api 
    44 
    5 This section of the tutorial says to add __unicode__() method to your Model classes so that admin and shell display useful strings. This is correct for Python 2.x, but breaks object display under Python 3.3. __str__() should be used instead of __unicode__(). Tutorial probably needs a sidebar or other additional information for users using Python 3.x.  
     5This section of the tutorial says to add `__unicode__()` method to your Model classes so that admin and shell display useful strings. This is correct for Python 2.x, but breaks object display under Python 3.3. `__str__()` should be used instead of `__unicode__()`. Tutorial probably needs a sidebar or other additional information for users using Python 3.x.