title: How to save a global variable in flask?
body: <p>I want to save a global variable in flask, and after reading some documentation I know that 'flask.g' can do what I want, but during the test I found that the variable 'g' can't be saved like session, if I change the page in the same application, the variable 'g' miss it's attribute, after reading some documents, I found that in the previous version of flask, variable 'g' is only on the request context, but <a href="http://flask.pocoo.org/docs/0.10/api/#flask.g" rel="nofollow">'Starting with Flask 0.10 this is stored on the application context and no longer on the request context which means it becomes available if only the application context is bound and not yet a request.'</a></p>
  
  <p>So I want to know why variable 'g' can't be saved in all the pages of my application, and if I want to save a global variable which can be used in all pages, how should I do it?</p>
  
  <p>thx!</p>