Django

Code

Changeset 649

Show
Ignore:
Timestamp:
09/19/05 21:37:39 (3 years ago)
Author:
adrian
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/model-api.txt

    r586 r649  
    787787    contents of the given fields: 
    788788 
    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. 
    791794 
    792795        * If the field is a ``BooleanField``, a "on" or "off" icon will 
     
    797800          ``short_description`` function attribute, for use as the header for 
    798801          the field. 
     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. 
    799807 
    800808    See the example below.