Skip to content

Commit 0f7f358

Browse files
committed
Django form utils has been renamed, added compatibility import.
1 parent 84bfde0 commit 0f7f358

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGES.rst

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ CHANGES
44
tip (unreleased)
55
----------------
66

7+
- Fixed compatibility with Django 1.9. Fixed GH-12.
8+
79
1.0.2 (2014-09-08)
810
------------------
911

form_utils/forms.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
from copy import deepcopy
1010

1111
from django import forms
12-
from django.forms.util import flatatt, ErrorDict
12+
try:
13+
from django.forms.utils import flatatt, ErrorDict
14+
except ImportError: # Django < 1.9 compatibility
15+
from django.forms.util import flatatt, ErrorDict
1316
from django.utils import six
1417
from django.utils.safestring import mark_safe
1518

0 commit comments

Comments
 (0)