diff options
author | Michel Sabchuk <michel@turbosys.com.br> | 2014-09-01 12:10:55 -0300 |
---|---|---|
committer | Michel Sabchuk <michel@turbosys.com.br> | 2014-09-01 12:10:55 -0300 |
commit | 08b50680c71b903634f7137a596ac5c0fe21562f (patch) | |
tree | 0a2ce5f2383a960eed733eec1a250c5b7afbb956 /wkhtmltopdf | |
parent | ec709959f0a2827589bc8ff532136a8e09f40acd (diff) | |
download | django-wkhtmltopdf-08b50680c71b903634f7137a596ac5c0fe21562f.tar.gz django-wkhtmltopdf-08b50680c71b903634f7137a596ac5c0fe21562f.tar.bz2 django-wkhtmltopdf-08b50680c71b903634f7137a596ac5c0fe21562f.zip |
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.
Diffstat (limited to 'wkhtmltopdf')
-rw-r--r-- | wkhtmltopdf/views.py | 6 |
1 files changed, 1 insertions, 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) |