Ticket #20448: 20448.diff

File 20448.diff, 863 bytes (added by Preston Holmes, 11 years ago)
  • docs/ref/models/instances.txt

    diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt
    index f989ff1..6a3c360 100644
    a b object. Django uses ``unicode(obj)`` (or the related function, :meth:`str(obj)  
    434434<Model.__str__>`) in a number of places. Most notably, to display an object in
    435435the Django admin site and as the value inserted into a template when it
    436436displays an object. Thus, you should always return a nice, human-readable
    437 representation of the model from the ``__unicode__()`` method.
     437representation of the model from the ``__unicode__()`` method. Because this
     438method may be called from Django internals outside of code you write, you
     439should be aware of any unintended side effects, including queries resulting
     440from fetching information on related models.
    438441
    439442For example::
    440443
Back to Top