Ticket #7460: cache_replace_space_with_underscore.diff

File cache_replace_space_with_underscore.diff, 575 bytes (added by trbs, 7 years ago)
  • django/templatetags/cache.py

    diff -r a7be18090928 django/templatetags/cache.py
    a b  
    1616        # Build a unicode key for this fragment and all vary-on's.
    1717        cache_key = u':'.join([self.fragment_name] + \
    1818            [force_unicode(resolve_variable(var, context)) for var in self.vary_on])
     19        cache_key = cache_key.replace(" ", "_")
    1920        value = cache.get(cache_key)
    2021        if value is None:
    2122            value = self.nodelist.render(context)
Back to Top