Author: kmtracey
Date: 2009-05-26 11:46:56 -0500 (Tue, 26 May 2009)
New Revision: 10843
Modified:
django/trunk/docs/intro/tutorial01.txt
Log:
Fixed #11205 -- Made the links to the str method description look the same as
the links to the unicode method description in the tutorial part 1. Having one
be fully qualified while the other was not was odd-looking.
Modified: django/trunk/docs/intro/tutorial01.txt
===================================================================
--- django/trunk/docs/intro/tutorial01.txt 2009-05-26 16:33:10 UTC (rev
10842)
+++ django/trunk/docs/intro/tutorial01.txt 2009-05-26 16:46:56 UTC (rev
10843)
@@ -595,16 +595,16 @@
automatically-generated admin.
.. admonition:: Why :meth:`~django.db.models.Model.__unicode__` and not
- :meth:`django.db.models.Model.__str__`?
+ :meth:`~django.db.models.Model.__str__`?
If you're familiar with Python, you might be in the habit of adding
- :meth:`django.db.models.Model.__str__` methods to your classes, not
+ :meth:`~django.db.models.Model.__str__` methods to your classes, not
:meth:`~django.db.models.Model.__unicode__` methods. We use
:meth:`~django.db.models.Model.__unicode__` here because Django models deal
with Unicode by default. All data stored in your database is converted to
Unicode when it's returned.
- Django models have a default :meth:`django.db.models.Model.__str__` method
+ Django models have a default :meth:`~django.db.models.Model.__str__` method
that calls :meth:`~django.db.models.Model.__unicode__` and converts the
result to a UTF-8 bytestring. This means that ``unicode(p)`` will return a
Unicode string, and ``str(p)`` will return a normal string, with characters
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---