Load and generate a template.

def generate_template(template_name, **context):
    """Load and generate a template."""
    context.update(href=href, format_datetime=format_datetime)
    return template_loader.load(template_name).generate(**context)