mirror of
https://github.com/django/django.git
synced 2024-12-01 15:42:04 +01:00
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:
parent
a9a04ca8f6
commit
f9d27b5d0b
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user