8.2.10.4.11.8. JSONField¶
- class JSONField(*args, **kwargs)[source]¶
Methods
__call__Render this field as HTML, using keyword args as additional attributes.
__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).
__html__Returns a HTML representation of the field.
Construct a new field.
__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__Returns a HTML representation of the field.
__subclasshook__Abstract classes can override this to customize issubclass().
_run_validation_chainRun a validation chain, stopping if any validator raises StopValidation.
check_validatorsgettextGet a translation for the given message.
ngettextGet a translation for a message which can be pluralized.
populate_objPopulates obj.<name> with the field's data.
post_validateOverride if you need to run any field-level validation tasks after normal validation.
pre_validateOverride if you need field-level validation.
processProcess incoming data, calling process_data, process_formdata as needed, and run filters.
process_dataProcess the Python data applied to this field and store the result.
process_formdataProcess data received over the wire from a form.
validateValidates the field and returns True or False.
- __init__(label=None, validators=None, filters=(), description='', id=None, default=None, widget=None, render_kw=None, name=None, _form=None, _prefix='', _translations=None, _meta=None)¶
Construct a new field.
- Parameters:
label – The label of the field.
validators – A sequence of validators to call when validate is called.
filters – A sequence of callable which are run by
process()to filter or transform the input data. For exampleStringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.description – A description for the field, typically used for help text.
id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.
default – The default value to assign to the field, if no form or object input is provided. May be a callable.
widget – If provided, overrides the widget used to render the field.
render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.
name – The HTML name of this field. The default value is the Python attribute name.
_form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.
_prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.
_translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.
_meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.
If _form isn’t provided, an
UnboundFieldwill be returned instead. Call itsbind()method with a form instance and a name to construct the field.
Attributes
__dict____weakref__list of weak references to the object
_formfield_translationsdo_not_call_in_templateserrorsprocess_errorsraw_datavalidatorswidget- __annotations__ = {}¶
- __doc__ = None¶
- __module__ = 'schedula.utils.form.server.security'¶