Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Nov 7, 2011
  1. @pelme

    Fixes checksum calculation in offline mode with templatetags inside c…

    pelme authored
    …ompress blocks.
    
    To calculate the hash for a compress block, get_offline_hexdigest() calls smart_str on each template node, which resulted in the Python repr of the templates node which is not a text node.
    
    This caused problems when using the {% static %} tag inside a compress block, since the {% static %} repr looks something like this:
    
    >>> template.Template('{% load static %}{% static "foo" %}').nodelist
    [<django.template.defaulttags.LoadNode at 0x10e747510>, <django.template.base.SimpleNode at 0x10e747490>]
    
    The repr changes on every compilation (since the memory location changes), which caused the checksum to change every time, and thus made the offline mode unusable.
    
    This patch renders the blocks completely, and calculates the checksums on the entire rendered block.
Something went wrong with that request. Please try again.