mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Added test to demonstrate issue 11387 isn't there anymore.
Thanks adurdin for the report and patch. Fixes #11387.
This commit is contained in:
@@ -6,7 +6,7 @@ from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
__all__ = ('Link', 'Place', 'Restaurant', 'Person', 'Address',
|
||||
'CharLink', 'TextLink', 'OddRelation1', 'OddRelation2',
|
||||
'Contact', 'Organization', 'Note')
|
||||
'Contact', 'Organization', 'Note', 'Company')
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Link(models.Model):
|
||||
@@ -84,3 +84,10 @@ class Organization(models.Model):
|
||||
name = models.CharField(max_length=255)
|
||||
contacts = models.ManyToManyField(Contact, related_name='organizations')
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Company(models.Model):
|
||||
name = models.CharField(max_length=100)
|
||||
links = generic.GenericRelation(Link)
|
||||
|
||||
def __str__(self):
|
||||
return "Company: %s" % self.name
|
||||
|
||||
Reference in New Issue
Block a user