From 281371e40c845714c39f2c44d20b7112c4a079e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gregor=20M=C3=BCllegger?= Date: Tue, 1 Apr 2014 01:52:19 +0200 Subject: [PATCH] Taking care of DeprecationWarning regarding the renaming of django.forms.util -> django.forms.utils. --- floppyforms/widgets.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/floppyforms/widgets.py b/floppyforms/widgets.py index 2a717c4..5080000 100644 --- a/floppyforms/widgets.py +++ b/floppyforms/widgets.py @@ -4,7 +4,11 @@ import django from django import forms -from django.forms.util import to_current_timezone +try: + from django.forms.utils import to_current_timezone +except ImportError: + # Fall back to old module name for Django <= 1.5 + from django.forms.util import to_current_timezone from django.forms.widgets import FILE_INPUT_CONTRADICTION from django.conf import settings from django.template import loader