Commit e5d0ab0a by andreas.pelme

Fixed #15. Thanks Alexander Pugachev!


git-svn-id: https://django-compress.googlecode.com/svn/trunk@70 98d35234-f74b-0410-9e22-51d878bdf110
parent a0b88187
......@@ -11,7 +11,7 @@ register = template.Library()
def render_common(template_name, obj, filename, version):
if settings.COMPRESS:
filename = get_output_filename(filename, get_version(version))
filename = get_output_filename(filename, version)
context = obj.get('extra_context', {})
context['url'] = media_url(filename)
......
......@@ -86,8 +86,8 @@ def save_file(filename, contents):
fd.close()
def get_output_filename(filename, version):
if settings.COMPRESS_VERSION:
return filename.replace(settings.COMPRESS_VERSION_PLACEHOLDER, version)
if settings.COMPRESS_VERSION and version is not None:
return filename.replace(settings.COMPRESS_VERSION_PLACEHOLDER, get_version(version))
else:
return filename.replace(settings.COMPRESS_VERSION_PLACEHOLDER, settings.COMPRESS_VERSION_DEFAULT)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment