Author: mtredinnick
Date: 2007-07-14 09:50:35 -0500 (Sat, 14 Jul 2007)
New Revision: 5697
Modified:
django/trunk/tests/modeltests/str/models.py
Log:
Fixed #4870 -- Removed unneeded import and fixed a docstring in an example.
Thanks, Collin Grady.
Modified: django/trunk/tests/modeltests/str/models.py
===================================================================
--- django/trunk/tests/modeltests/str/models.py 2007-07-14 14:47:14 UTC (rev
5696)
+++ django/trunk/tests/modeltests/str/models.py 2007-07-14 14:50:35 UTC (rev
5697)
@@ -8,14 +8,13 @@
with the interactive prompt, but also because objects' representations are used
throughout Django's automatically-generated admin.
-Normally, you should write ``__unicode__``() method, since this will work for
+Normally, you should write ``__unicode__()`` method, since this will work for
all field types (and Django will automatically provide an appropriate
``__str__()`` method). However, you can write a ``__str__()`` method directly,
if you prefer. You must be careful to encode the results correctly, though.
"""
from django.db import models
-from django.utils.encoding import smart_str
class Article(models.Model):
headline = models.CharField(maxlength=100)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---