summaryrefslogtreecommitdiff
path: root/tests/modeltests/get_or_create/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/modeltests/get_or_create/models.py')
-rw-r--r--tests/modeltests/get_or_create/models.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/modeltests/get_or_create/models.py b/tests/modeltests/get_or_create/models.py
index 78b92f09df..678f5a401c 100644
--- a/tests/modeltests/get_or_create/models.py
+++ b/tests/modeltests/get_or_create/models.py
@@ -9,14 +9,16 @@ parameters.
from __future__ import unicode_literals
from django.db import models
+from django.utils.encoding import python_2_unicode_compatible
+@python_2_unicode_compatible
class Person(models.Model):
first_name = models.CharField(max_length=100)
last_name = models.CharField(max_length=100)
birthday = models.DateField()
- def __unicode__(self):
+ def __str__(self):
return '%s %s' % (self.first_name, self.last_name)
class ManualPrimaryKeyTest(models.Model):