Saved Bookmarks
| 1. |
What Is The Difference Between “g” Variable And “session” In The Flask? |
|
Answer» “g” is DATA shared between different parts of the code base within ONE request cycle. For EXAMPLE, a database connection or the user that is currently logged in. While session provides you a storage place to store data for a SPECIFIC browser. Which MEANS using a specific browser, returns for more request. “g” is data shared between different parts of the code base within one request cycle. For example, a database connection or the user that is currently logged in. While session provides you a storage place to store data for a specific browser. Which means using a specific browser, returns for more request. |
|