def include_sidebar_data(fn):
    template_name = fn()
var1, var2, var3 = generate_sidebar_data()

def wrapped():
    return render_template(template_name, var1=var2, var2=var2)
return wrapped

@blueprint.route('/')
@include_sidebar_data
def frontpage():
    return 'template.html'
How can I send variables to Jinja template from a Flask decorator?