1. Dan Jacob
  2. flask-wtf
Issue #21 new

flask-wtf is broken with WTForms 1.0

Anonymous created an issue

The new version of WTForms was released today, and flask-wtf no longer works. Try doing {{{ from flaskext.wtf import * }}}

and you'll get an error about {{{all}}} no longer being in {{{fields}}}.

Comments (3)

  1. Anonymous

    Here's a working patch:

    --- wtf/__init__.py.orig        2012-02-29 09:14:05.440724778 +0100
    +++ wtf/__init__.py     2012-02-29 09:15:59.449288564 +0100
    @@ -69,9 +69,9 @@
     __all__  = ['Form', 'ValidationError',
                 'fields', 'validators', 'widgets', 'html5']
     
    -__all__ += fields.__all__
    +__all__ += fields.core.__all__
     __all__ += validators.__all__
    -__all__ += widgets.__all__
    +__all__ += widgets.core.__all__
     __all__ += recaptcha.__all__
     
     if _is_sqlalchemy:
    
    
  2. Anonymous

    Maybe I'm not doint something right, but after upgrading Flask-WTF and WTForms, doing:

    from flaskext.wtf import *
    

    I don't have FileField, TextField or any of the classes in wtforms/fields/simple.py available to me. I see no mention of this module in flaskext/wtf/init.py.

  3. Log in to comment