From f9d27b5d0be082d5a67404512067858530ec9e80 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sat, 14 Jul 2007 14:50:35 +0000 Subject: [PATCH] Fixed #4870 -- Removed unneeded import and fixed a docstring in an example. Thanks, Collin Grady. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5697 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/modeltests/str/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/modeltests/str/models.py b/tests/modeltests/str/models.py index b4d3adcd6d..6bd6a7e448 100644 --- a/tests/modeltests/str/models.py +++ b/tests/modeltests/str/models.py @@ -8,14 +8,13 @@ representation of the object. Do this not only for your own sanity when dealing 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)