From 08b50680c71b903634f7137a596ac5c0fe21562f Mon Sep 17 00:00:00 2001 From: Michel Sabchuk Date: Mon, 1 Sep 2014 12:10:55 -0300 Subject: Rely only smart_text once django 1.4 also supports it. As well pointed by @mattack108, django 1.4 also haves smart_text. We don't have to do that import. --- wkhtmltopdf/views.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/wkhtmltopdf/views.py b/wkhtmltopdf/views.py index 949ae38..d5f189a 100644 --- a/wkhtmltopdf/views.py +++ b/wkhtmltopdf/views.py @@ -6,11 +6,7 @@ from django.conf import settings from django.http import HttpResponse from django.template.response import TemplateResponse from django.views.generic import TemplateView -try: - from django.utils.encoding import smart_text -except ImportError: - # Django 1.4 doesn't have smart_text, we must smart_unicode in place - from django.utils.encoding import smart_unicode as smart_text +from django.utils.encoding import smart_text from .utils import (content_disposition_filename, make_absolute_paths, wkhtmltopdf) -- cgit v1.2.3