Skip to content

issue with Flask_wtf (resolved) #4

@sylvain471

Description

@sylvain471

Hi, thanks for this very nice repo.

I couldn't install the requirements using pip install -r requirements.txt my terminal threw some errors that I couldn't resolve.

I installed all packages regardless of the version number given in the requirements.txt.

I ran the steps mentioned in a previous issue

flask db init 
...

When I started the app I tried to sign up and the following issue came up

TypeError: validate() got an unexpected keyword argument 'extra_validators'

Finding the form.py file in the flask_wtf package directory and changing the method validate_on_submit

    def validate_on_submit(self, extra_validators=None):
        """Call :meth:`validate` only if the form is submitted.
        This is a shortcut for ``form.is_submitted() and form.validate()``.
        """
        #return self.is_submitted() and self.validate(extra_validators=extra_validators)
        return self.is_submitted() and self.validate()

ie removing extra_validator from validate, solved the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions