Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added a few notes about list_display to docs/model-api.txt

git-svn-id: http://code.djangoproject.com/svn/django/trunk@649 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 1d65ba62dbfb9e6f13bccbf03bf9444c6c6d6481 1 parent 473306a
Adrian Holovaty authored September 20, 2005

Showing 1 changed file with 10 additions and 2 deletions. Show diff stats Hide diff stats

  1. 12  docs/model-api.txt
12  docs/model-api.txt
@@ -786,8 +786,11 @@ object, which takes the following parameters. All are optional.
786 786
     There are a few special cases that do other things besides displaying the
787 787
     contents of the given fields:
788 788
 
789  
-        * If the field given has a relationship, that relationship is
790  
-          followed and the ``repr()`` of the related object is displayed.
  789
+        * If the field given is a ``ForeignKey``, the ``repr()`` of the related
  790
+          object will be displayed.
  791
+
  792
+        * ``ManyToManyField`` fields aren't supported, because that would
  793
+          entail executing a separate SQL statement for each row in the table.
791 794
 
792 795
         * If the field is a ``BooleanField``, a "on" or "off" icon will
793 796
           be displayed instead of ``True`` or ``False``.
@@ -797,6 +800,11 @@ object, which takes the following parameters. All are optional.
797 800
           ``short_description`` function attribute, for use as the header for
798 801
           the field.
799 802
 
  803
+        * Use the string ``"__repr__"`` to output the representation of the
  804
+          object, according to your model's ``__repr__()`` function. If you
  805
+          don't define ``list_display``, Django will use the ``__repr__`` by
  806
+          default.
  807
+
800 808
     See the example below.
801 809
 
802 810
 ``list_filter``

0 notes on commit 1d65ba6

Please sign in to comment.
Something went wrong with that request. Please try again.