Hello, I'm trying to make a Vaildation for the fields in my form, but for some reason
submit.on_validation() doesn't work.
By the way, the secret key provided is not my actual secret key.
This is the code
#๐ FlaskWtf error with validation.
15 messages ยท Page 1 of 1 (latest)
@regal hawk
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Closes after a period of inactivity, or when you send !close.
use os.getenv for storing secrets
If you won't print it, nobody will know it, also useful if you're going to upload it on github
Hey, most of the time I'm using environemntal variable.
By the way, what is app.config?
And can you maybe help me with the problem that I wrote?
Import and subclass FlaskForm, not from Form. Form is the parent class directly from wtforms and does not implement the method you are calling.
@regal hawk
so how it should look like?
Change your import to FlaskForm. Subclass from that.
Like this?
probably, yes
Thank you very much!!
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.