I have a Flask web app written in Python3. The issue I have though is, that all the variables are always shared between all users that access my website.
For example, if user1 during his time on my website clicks a button which in Python3 does var1 = "aaa"
and then populates this variable into an HTML input field, then all of the other users accessing the website will see the input field with value aaa
.
I'm using gunicorn3 as my WSGI. I have also tried to gunicorn3 python-docx:app -k gevent --worker-connections 1000
but that didn't help at all.
(python-docx is the name of my Python3 file)
How can I make sure, that the variables in my Python code are NOT shared between each sessions of different users? I want to make sure, that only the variables and their values are visible to each user specifically, not have them shared like now.
Is it possible?
Thank you very much.
Edit: I do not use database nor do I use a login system for my web app. My web app is public without any user management so anyone can use the web app's functionality for free.
foo = aaa
you can query for the users foo in the database and populate with that.