def fp_lastmod(request, url):
return datetime.datetime.fromtimestamp(
Path(loader.get_template(
FlatPage.objects.get(url=url).template_name
or "flatpages/default.html"
).template.origin.name).stat().st_mtime
)