From 0ed7d155635da9f79d4dd67e4889087d3673c6da Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Wed, 28 Jan 2015 07:35:27 -0500 Subject: Sorted imports with isort; refs #23860. --- django/forms/utils.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'django/forms/utils.py') 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): -- cgit v1.3