Commit cf7a0787 authored by Malcolm Tredinnick's avatar Malcolm Tredinnick
Browse files

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.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent e545058b
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -18,7 +18,8 @@ class BaseCommentAbstractModel(models.Model):
    """

    # Content-object field
    content_type   = models.ForeignKey(ContentType)
    content_type   = models.ForeignKey(ContentType,
            related_name="content_type_set_for_%(class)s")
    object_pk      = models.TextField(_('object ID'))
    content_object = generic.GenericForeignKey(ct_field="content_type", fk_field="object_pk")