summaryrefslogtreecommitdiff
path: root/django/forms/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/forms/utils.py')
-rw-r--r--django/forms/utils.py18
1 files changed, 7 insertions, 11 deletions
diff --git a/django/forms/utils.py b/django/forms/utils.py
index 19c27f9b8c..ab0c80769b 100644
--- a/django/forms/utils.py
+++ b/django/forms/utils.py
@@ -3,21 +3,17 @@ from __future__ import unicode_literals
import json
import sys
-try:
- from collections import UserList
-except ImportError: # Python 2
- from UserList import UserList
-
from django.conf import settings
+from django.core.exceptions import ValidationError # backwards compatibility
+from django.utils import six, timezone
from django.utils.encoding import force_text, python_2_unicode_compatible
-from django.utils.html import format_html, format_html_join, escape
-from django.utils import timezone
+from django.utils.html import escape, format_html, format_html_join
from django.utils.translation import ugettext_lazy as _
-from django.utils import six
-# Import ValidationError so that it can be imported from this
-# module to maintain backwards compatibility.
-from django.core.exceptions import ValidationError
+try:
+ from collections import UserList
+except ImportError: # Python 2
+ from UserList import UserList
def flatatt(attrs):