From e4a84d5f2e1282ed62d19ce7c52ca57eabb54598 Mon Sep 17 00:00:00 2001 From: Marc Tamlyn Date: Fri, 27 Jul 2012 11:36:02 +0100 Subject: Don't override builtins by importing. --- wkhtmltopdf/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wkhtmltopdf/views.py b/wkhtmltopdf/views.py index 20002bd..6668474 100644 --- a/wkhtmltopdf/views.py +++ b/wkhtmltopdf/views.py @@ -1,7 +1,7 @@ from __future__ import absolute_import -from re import compile from tempfile import NamedTemporaryFile +import re from django.conf import settings from django.http import HttpResponse @@ -160,7 +160,7 @@ class PDFTemplateResponse(TemplateResponse, PDFResponse): if self.override_settings is not None: overrides.update(self.override_settings) - has_scheme = compile(r'^[^:/]+://') + has_scheme = re.compile(r'^[^:/]+://') # If MEDIA_URL doesn't have a scheme, we transform it into a # file:// URL based on MEDIA_ROOT. -- cgit v1.2.3