Answer the question
In order to leave comments, you need to log in
How to fix a form in Flask?
There is a small application on flask. There is a standard authorization form in which user.id is written in flask.session.
The problem is that the form is always invalidated (via form.validate_on_submit()). And this only happens on a home macbook. On all other machines (working (linux) and server (linux server)) everything works as it should.
form.validate() and form.validate_on_submit() always return False.
there are no errors in form.errors.
csrf_token is set and displayed correctly in the template, all data is received normally in the controller. I tried to output csrf via form.hidden_tag(), it didn't help.
The project uses:
Flask (0.12.2)
Flask-WTF (0.14.2)
WTForms (2.1)
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