summaryrefslogtreecommitdiff
path: root/tests/modeltests/basic/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/modeltests/basic/models.py')
-rw-r--r--tests/modeltests/basic/models.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/modeltests/basic/models.py b/tests/modeltests/basic/models.py
index c3ad38d661..835c5c90cf 100644
--- a/tests/modeltests/basic/models.py
+++ b/tests/modeltests/basic/models.py
@@ -4,12 +4,18 @@
This is a basic model with only two non-primary-key fields.
"""
-
+# Python 2.3 doesn't have set as a builtin
try:
set
except NameError:
from sets import Set as set
+# Python 2.3 doesn't have sorted()
+try:
+ sorted
+except NameError:
+ from django.utils.itercompat import sorted
+
from django.db import models
class Article(models.Model):