niwinz / django-jinja

Simple and nonobstructive jinja2 integration with Django.
http://niwinz.github.io/django-jinja/latest/
BSD 3-Clause "New" or "Revised" License
363 stars 102 forks source link

UnicodeDecodeError with cache tag #158

Closed mireq closed 8 years ago

mireq commented 8 years ago

Template fragment cache ({% cache %}) returns 'str' object instead of 'unicode' with django.core.cache.backends.memcached.MemcachedCache backend. This yields UnicodeDecodeError if fragment contains unicode data.

If i change return value to return force_text(value) in CacheExtension everything works OK.

niwinz commented 8 years ago

Thanks! A PR is very welcome to fix it ;)

niwinz commented 8 years ago

The test failure seems unrelated. Thanks