As per docs setting up flask app with WTForms it throws ImportError.
ImportError: cannot import name 'SeaSurfForm' from partially initialized module 'seasurf_form' (most likely due to a circular import)
And HiddenField, TextField, PasswordField are part of wtforms package not under flask_wtf.
Also DataRequired, Email are inside wtforms.validators not under flask_wtf.
As per docs setting up flask app with WTForms it throws
ImportError
.And
HiddenField
,TextField
,PasswordField
are part ofwtforms
package not underflask_wtf
. AlsoDataRequired
,Email
are insidewtforms.validators
not underflask_wtf
.On wtforms, https://github.com/wtforms/wtforms/blob/244c8d6b15accb3e2efd622241e5f7c1cc8abb9d/wtforms/form.py#L181-L200
Above code ignores attributes starting with
'_'
. So it'll ignore seasurf's csrf token field(CSRF_COOKIE_NAME
) having default name'_csrf_token'