Inject variable into flask jinjia2 template html

You can do this when you want to inject some value into your page, but not from your calculation.

code section:

  @flask_app.context_processor
  def inject_yourstuff():
      return {
                 'publish_date':datetime.datetime.utcnow(),
                  'App_ver': '1.0.1.223'
                  }

in your page html, you have to have these two section defined:

   <div>
       My blog Application {{ App_ver }}
   </div>
    <div>
     copyright {{ publish_date }} snughut.com --All rights reserved.
    </div>