Modified templates for retrocompatibility with django 1.4