Please see question here for details? http://stackoverflow.com/questions/15858947/how-can-i-send-variables-to-jinja-template-from-a-flask-decorator Thanks! - chrickso
I posted a reply to your SO question here ( http://stackoverflow.com/a/15859225/178060) but I'll say it on the mailing list, I think you're over complicating it. You just need a new render_template function which always calls that method and adds those variables to the rendered template. For inspiration, look at this Flask-Snippet: http://flask.pocoo.org/snippets/15/ Hope that helps. On Sun, Apr 7, 2013 at 12:47 AM, chrickso <chrickso@gmail.com> wrote: > Please see question here for details? > > http://stackoverflow.com/questions/15858947/how-can-i-send-variables-to-jinja-template-from-a-flask-decorator > > Thanks! > > - chrickso >
Ooops, wrong link (http://stackoverflow.com/a/15862998/178060) Careless me. On Sun, Apr 7, 2013 at 9:40 AM, Owein Reese <owreese@gmail.com> wrote: > I posted a reply to your SO question here ( > http://stackoverflow.com/a/15859225/178060) but I'll say it on the > mailing list, I think you're over complicating it. You just need a new > render_template function which always calls that method and adds those > variables to the rendered template. For inspiration, look at this > Flask-Snippet: http://flask.pocoo.org/snippets/15/ > > Hope that helps. > > > On Sun, Apr 7, 2013 at 12:47 AM, chrickso <chrickso@gmail.com> wrote: > >> Please see question here for details? >> >> http://stackoverflow.com/questions/15858947/how-can-i-send-variables-to-jinja-template-from-a-flask-decorator >> >> Thanks! >> >> - chrickso >> > >
On Sun, Apr 7, 2013 at 12:47 AM, chrickso <chrickso@gmail.com> wrote: > > http://stackoverflow.com/questions/15858947/how-can-i-send-variables-to-jinja-template-from-a-flask-decorator Just quickly looking at the question, looks as if you want a context processor: https://gist.github.com/thrisp/5342561