From 94153a3b8fe04d4ee2773cb0143709e145d80ec1 Mon Sep 17 00:00:00 2001 From: w- Date: Wed, 15 Apr 2015 13:12:28 -0700 Subject: [PATCH] make json_field work with django 1.7+ properly django.form.util is renamed to django.form.utils and will be removed starting v1.9 http://django.readthedocs.org/en/latest/releases/1.7.html#util-modules-renamed-to-utils --- json_field/forms.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/json_field/forms.py b/json_field/forms.py index 830217b..1c41fba 100644 --- a/json_field/forms.py +++ b/json_field/forms.py @@ -2,7 +2,14 @@ import json except ImportError: # python < 2.6 from django.utils import simplejson as json -from django.forms import fields, util + +from django.forms import fields + +import warnings +try: + from django.forms import util +except (Warning, ImportError): + from django.forms import utils as util import datetime from decimal import Decimal