Django

Code

Show
Ignore:
Timestamp:
04/24/08 06:21:49 (4 months ago)
Author:
mtredinnick
Message:

queryset-refactor: Clarified what the default reverse names are for
ManyToManyFields? and ForeignKeys? on abstract base classes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/queryset-refactor/docs/model-api.txt

    r7432 r7452  
    21862186errors when you validate your models (or run ``syncdb``). 
    21872187 
     2188If you don't specify a ``related_name`` attribute for a field in an abstract 
     2189base class, the default reverse name will be the name of the child class 
     2190followed by ``'_set'``, just as it normally would be if you'd declared the field directly on the child class. For example, in the above code, if the ``related_name`` attribute was omitted, the reverse name for the ``m2m`` field would be ``childa_set`` in the ``ChildA`` case and ``childb_set`` for the ``ChildB`` field. 
     2191 
    21882192Multi-table inheritance 
    21892193-----------------------