From b4a076c8226223bb650605f4d04609f1f59b5913 Mon Sep 17 00:00:00 2001 From: markotibold Date: Sun, 20 Mar 2011 11:56:43 +0100 Subject: [PATCH] fixing compat with py25 --- examples/blogpost/tests.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/blogpost/tests.py b/examples/blogpost/tests.py index 3cc1aed07..dfb4d5f57 100644 --- a/examples/blogpost/tests.py +++ b/examples/blogpost/tests.py @@ -165,7 +165,10 @@ class AllowedMethodsTests(TestCase): #above testcases need to probably moved to the core from djangorestframework.compat import RequestFactory -import json +try: + import json +except ImportError: + import simplejson as json class TestRotation(TestCase): """For the example the maximum amount of Blogposts is capped off at views.MAX_POSTS.