Fixes for Django 1.6 and better templates