Use ifchanged on dates to work around a bug in Django 1.7

It looks like there is a bug in Django 1.7 to do with ifchanged
and including templates. This should allow us to work around it
by using ifchanged on the variables needed rather than the
compiled content.