diff options
Diffstat (limited to 'tests/null_fk_ordering')
| -rw-r--r-- | tests/null_fk_ordering/models.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/null_fk_ordering/models.py b/tests/null_fk_ordering/models.py index 3caff0d594..dac1c4f6ae 100644 --- a/tests/null_fk_ordering/models.py +++ b/tests/null_fk_ordering/models.py @@ -15,6 +15,7 @@ from django.utils.encoding import python_2_unicode_compatible class Author(models.Model): name = models.CharField(max_length=150) + @python_2_unicode_compatible class Article(models.Model): title = models.CharField(max_length=150) @@ -31,10 +32,12 @@ class Article(models.Model): class SystemInfo(models.Model): system_name = models.CharField(max_length=32) + class Forum(models.Model): system_info = models.ForeignKey(SystemInfo) forum_name = models.CharField(max_length=32) + @python_2_unicode_compatible class Post(models.Model): forum = models.ForeignKey(Forum, null=True) @@ -43,6 +46,7 @@ class Post(models.Model): def __str__(self): return self.title + @python_2_unicode_compatible class Comment(models.Model): post = models.ForeignKey(Post, null=True) |
