Browse Source

Fix import issue

Denis K 9 years ago
parent
commit
f59fc0031e
1 changed files with 4 additions and 1 deletions
  1. 4 1
      jet/utils.py

+ 4 - 1
jet/utils.py

@@ -1,6 +1,9 @@
 import datetime
 import json
-from django.apps.registry import apps
+try:
+    from django.apps.registry import apps
+except ImportError:
+    from django.apps import apps # Fix Django < 1.8 import issue
 from django.core.serializers.json import DjangoJSONEncoder
 from django.http import HttpResponse
 from django.core.urlresolvers import reverse, resolve, NoReverseMatch