Skip to content

Instantly share code, notes, and snippets.

@albe-rosado
Last active November 24, 2016 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save albe-rosado/48e6451cca17162cf1498bd060910572 to your computer and use it in GitHub Desktop.
Save albe-rosado/48e6451cca17162cf1498bd060910572 to your computer and use it in GitHub Desktop.
from werkzeug.datastructures import MultiDict
from flaskext.wtf import FlaskForm, StringField, #....
class ContactForm(FlaskForm):
email = StringField('Email', [DataRequired(), Email()])
# ...
submit = SubmitField('Submit')
def reset(self):
data = MultiDict([ ('csrf', self.generate_csrf_token() ) ])
self.process(data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment