mirror of
				https://github.com/django/django.git
				synced 2025-11-04 18:07:54 +03:00 
			
		
		
		
	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
This commit is contained in:
		
							parent
							
								
									e545058ba9
								
							
						
					
					
						commit
						cf7a078774
					
				| 
						 | 
					@ -18,7 +18,8 @@ class BaseCommentAbstractModel(models.Model):
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Content-object field
 | 
					    # 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'))
 | 
					    object_pk      = models.TextField(_('object ID'))
 | 
				
			||||||
    content_object = generic.GenericForeignKey(ct_field="content_type", fk_field="object_pk")
 | 
					    content_object = generic.GenericForeignKey(ct_field="content_type", fk_field="object_pk")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user