Answer the question
In order to leave comments, you need to log in
Problem with adding data to an array in Flask, how to fix?
Good afternoon! The following problem occurred:
@app.route('/', methods=['GET','POST'])
def index():
if request.method == "POST":
login = request.form['login'] # I read the login that the user entered into the form and assign it to a variable.
There is the following fragment of the working code, I need to make the 'login' variable global or add it to some array. When I try to make a global login, it gives an error. If I create an array at the very beginning and internal functions add the login variable to it, then the output is again an empty array. What to do, how to live?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question