Fix django filter templates for django 1.6

Fixes #107. Thanks to nordbit for providing working code.