Permalink
Browse files

I think this is still more correct

git-svn-id: http://sorl-thumbnail.googlecode.com/svn/trunk@423 18c32c52-eb3f-0410-93bd-f15eff1430f4
  • Loading branch information...
1 parent 2ed788f commit 25f9eb2571f4447af2aa0a404f86c5b8390533b5 mikko@sorl.net committed Aug 21, 2008
Showing with 3 additions and 3 deletions.
  1. +1 −2 sorl/thumbnail/main.py
  2. +2 −1 sorl/thumbnail/templatetags/thumbnail.py
View
@@ -1,7 +1,7 @@
import os
from django.conf import settings
-from django.utils.encoding import iri_to_uri, force_unicode
+from django.utils.encoding import iri_to_uri
from sorl.thumbnail.base import Thumbnail
from sorl.thumbnail.processors import dynamic_import
@@ -27,7 +27,6 @@ class DjangoThumbnail(Thumbnail):
def __init__(self, relative_source, requested_size, opts=None,
quality=None, basedir=None, subdir=None, prefix=None,
relative_dest=None, processors=None):
- relative_source = force_unicode(relative_source)
# Set the absolute filename for the source file
source = self._absolute_path(relative_source)
@@ -2,6 +2,7 @@
import math
from django.template import Library, Node, Variable, VariableDoesNotExist, TemplateSyntaxError
from django.conf import settings
+from django.utils.encoding import force_unicode
from sorl.thumbnail.main import DjangoThumbnail, get_thumbnail_setting
from sorl.thumbnail.processors import dynamic_import, get_valid_options
@@ -47,7 +48,7 @@ def render(self, context):
DEBUG = get_thumbnail_setting('DEBUG')
# Resolve source variable
try:
- relative_source = self.source_var.resolve(context)
+ relative_source = force_unicode(self.source_var.resolve(context))
except VariableDoesNotExist:
if DEBUG:
raise VariableDoesNotExist("Variable '%s' does not exist." %

0 comments on commit 25f9eb2

Please sign in to comment.