diff options
Diffstat (limited to 'tests/modeltests/field_subclassing/models.py')
| -rw-r--r-- | tests/modeltests/field_subclassing/models.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/modeltests/field_subclassing/models.py b/tests/modeltests/field_subclassing/models.py index 2df9664cdc..642573cc83 100644 --- a/tests/modeltests/field_subclassing/models.py +++ b/tests/modeltests/field_subclassing/models.py @@ -8,13 +8,15 @@ from django.db import models from django.utils.encoding import force_text from .fields import SmallField, SmallerField, JSONField +from django.utils.encoding import python_2_unicode_compatible +@python_2_unicode_compatible class MyModel(models.Model): name = models.CharField(max_length=10) data = SmallField('small field') - def __unicode__(self): + def __str__(self): return force_text(self.name) class OtherModel(models.Model): |
