1
0
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:
Ramiro Morales
2013-02-01 22:10:16 -03:00
parent c4b6659269
commit 2ca37af621
2 changed files with 27 additions and 2 deletions

View File

@@ -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