Django

Code

Changeset 8803

Show
Ignore:
Timestamp:
09/01/08 12:56:22 (3 months ago)
Author:
mtredinnick
Message:

Added a related name to the ForeignKey? in the abstract base class of the
comment models. You'll never need to use this name, but it will lead to invalid
models if not present.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/contrib/comments/models.py

    r8673 r8803  
    1717    subclass. 
    1818    """ 
    19      
     19 
    2020    # Content-object field 
    21     content_type   = models.ForeignKey(ContentType) 
     21    content_type   = models.ForeignKey(ContentType, 
     22            related_name="content_type_set_for_%(class)s") 
    2223    object_pk      = models.TextField(_('object ID')) 
    2324    content_object = generic.GenericForeignKey(ct_field="content_type", fk_field="object_pk")