aboutsummaryrefslogtreecommitdiffstats
path: root/examples/pygments_api
diff options
context:
space:
mode:
authormarkotibold2011-03-20 10:37:38 +0100
committermarkotibold2011-03-20 10:37:38 +0100
commitd866f2177e92f10a554a7dfd7eee9d93d67927be (patch)
tree078926abed92a904c151dc35e1f3685740eac3a8 /examples/pygments_api
parent7f7be826e26e0640e990d6e082164d69fc41acde (diff)
downloaddjango-rest-framework-d866f2177e92f10a554a7dfd7eee9d93d67927be.tar.bz2
fix compat with python 2.5
Diffstat (limited to 'examples/pygments_api')
-rw-r--r--examples/pygments_api/tests.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/pygments_api/tests.py b/examples/pygments_api/tests.py
index 0036345c..017823b9 100644
--- a/examples/pygments_api/tests.py
+++ b/examples/pygments_api/tests.py
@@ -1,7 +1,12 @@
from django.test import TestCase
from djangorestframework.compat import RequestFactory
from pygments_api import views
-import tempfile, shutil, json
+import tempfile, shutil
+
+try:
+ import json
+except ImportError:
+ import simplejson as json
class TestPygmentsExample(TestCase):