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
This commit is contained in:
Malcolm Tredinnick 2007-07-14 14:50:35 +00:00
parent a9a04ca8f6
commit f9d27b5d0b
1 changed files with 1 additions and 2 deletions

View File

@ -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 with the interactive prompt, but also because objects' representations are used
throughout Django's automatically-generated admin. 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 all field types (and Django will automatically provide an appropriate
``__str__()`` method). However, you can write a ``__str__()`` method directly, ``__str__()`` method). However, you can write a ``__str__()`` method directly,
if you prefer. You must be careful to encode the results correctly, though. if you prefer. You must be careful to encode the results correctly, though.
""" """
from django.db import models from django.db import models
from django.utils.encoding import smart_str
class Article(models.Model): class Article(models.Model):
headline = models.CharField(maxlength=100) headline = models.CharField(maxlength=100)