1
0
forked from s434650/CatOrNot
docs/venv/lib/python3.6/site-packages/wtforms/ext/csrf/fields.py
2018-12-11 00:32:28 +01:00

19 lines
430 B
Python

from wtforms.fields import HiddenField
class CSRFTokenField(HiddenField):
current_token = None
def _value(self):
"""
We want to always return the current token on render, regardless of
whether a good or bad token was passed.
"""
return self.current_token
def populate_obj(self, *args):
"""
Don't populate objects with the CSRF token
"""
pass