Make templates work for Django 1.6