Have a look at context processors. You can inject variables or functions to templates on the app or blueprint level.<br><br>See here at the bottom <a href="http://flask.pocoo.org/docs/0.11/templating/">http://flask.pocoo.org/docs/0.11/templating/</a><div><br></div><div>Mark</div><div><span></span><br><br>On Thursday, July 14, 2016, John Robson <<a href="mailto:John.Robson@usp.br">John.Robson@usp.br</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<p>Hi everyone,<br>
<br>
I would like to pass several variables to all HTML pages, how can
I send a variable to all HTML pages, without pass it all the time
through "<b>render_template</b>"? eg: sending "time" to all HTML
pages<br>
<br>
<i><b>site.html</b></i><b><br>
</b><b>Last Update: {{ update }}</b><b><br>
</b><b><br>
</b><i><b>app.py</b></i><b><br>
</b><b> update = '2016-07-14 01:37:56'</b><b><br>
</b><b> return render_template('site.html', <u>update=update</u>)</b><br>
<br>
But how to pass this value every time to all HTML pages
automatically? Just:<br>
<b> return render_template('site.html')</b><br>
<br>
And the value 'update' will be there.<br>
<br>
Thank you for helping,<br>
John<br>
</p>
</div>
</blockquote></div>