mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
Deleted Django 1.3 import fallback in utils/sendfile.py
This commit is contained in:
parent
f8bbd9b9b5
commit
b655cda791
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user