From b655cda791d6b326dda854e98e50cdd28641c374 Mon Sep 17 00:00:00 2001 From: Mads Jensen Date: Wed, 4 Oct 2017 23:55:14 +0200 Subject: [PATCH] Deleted Django 1.3 import fallback in utils/sendfile.py --- wagtail/utils/sendfile.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/wagtail/utils/sendfile.py b/wagtail/utils/sendfile.py index ea59dea383..463e0c2dd0 100644 --- a/wagtail/utils/sendfile.py +++ b/wagtail/utils/sendfile.py @@ -74,11 +74,7 @@ def sendfile(request, filename, attachment=False, attachment_filename=None, mime parts = ['attachment'] if attachment_filename: from unidecode import unidecode - try: - from django.utils.encoding import force_text - except ImportError: - # Django 1.3 - from django.utils.encoding import force_unicode as force_text + from django.utils.encoding import force_text attachment_filename = force_text(attachment_filename) ascii_filename = unidecode(attachment_filename) parts.append('filename="%s"' % ascii_filename)