diff options
Diffstat (limited to 'tests/modeltests/m2m_multiple/models.py')
| -rw-r--r-- | tests/modeltests/m2m_multiple/models.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/modeltests/m2m_multiple/models.py b/tests/modeltests/m2m_multiple/models.py index 5a1aa122a9..26a0a2e798 100644 --- a/tests/modeltests/m2m_multiple/models.py +++ b/tests/modeltests/m2m_multiple/models.py @@ -10,22 +10,22 @@ Set ``related_name`` to designate what the reverse relationship is called. from django.db import models class Category(models.Model): - name = models.CharField(maxlength=20) + name = models.CharField(max_length=20) class Meta: ordering = ('name',) - def __str__(self): + def __unicode__(self): return self.name class Article(models.Model): - headline = models.CharField(maxlength=50) + headline = models.CharField(max_length=50) pub_date = models.DateTimeField() primary_categories = models.ManyToManyField(Category, related_name='primary_article_set') secondary_categories = models.ManyToManyField(Category, related_name='secondary_article_set') class Meta: ordering = ('pub_date',) - def __str__(self): + def __unicode__(self): return self.headline __test__ = {'API_TESTS':""" |
