8.2.10.4.4.1. CSRF¶
- class CSRF(app=None)[source]¶
Methods
__delattr__Implement delattr(self, name).
__dir__Default dir() implementation.
__eq__Return self==value.
__format__Default object formatter.
__ge__Return self>=value.
__getattribute__Return getattr(self, name).
__getstate__Helper for pickle.
__gt__Return self>value.
__hash__Return hash(self).
__init_subclass__This method is called when a class is subclassed.
__le__Return self<=value.
__lt__Return self<value.
__ne__Return self!=value.
__new____reduce__Helper for pickle.
__reduce_ex__Helper for pickle.
__repr__Return repr(self).
__setattr__Implement setattr(self, name, value).
__sizeof__Size of object in memory, in bytes.
__str__Return str(self).
__subclasshook__Abstract classes can override this to customize issubclass().
_error_response_get_csrf_tokenexemptMark a view or blueprint to be excluded from CSRF protection.
Receive the form we're attached to and set up fields.
- __init__(app=None)¶
Attributes
__dict____weakref__list of weak references to the object
- setup_form(form)[source]¶
Receive the form we’re attached to and set up fields.
The default implementation creates a single field of type
field_classwith name taken from thecsrf_field_nameof the class meta.- Parameters:
form – The form instance we’re attaching to.
- Returns:
A sequence of (field_name, unbound_field) 2-tuples which are unbound fields to be added to the form.
- __annotations__ = {}¶
- __doc__ = None¶
- __module__ = 'schedula.utils.form.server.csrf'¶