xia_fields.fields.IntField
- class xia_fields.fields.IntField(required=False, default=None, validation: Optional[callable] = None, no_display=False, **kwargs)
Bases:
BaseField- __init__(required=False, default=None, validation: Optional[callable] = None, no_display=False, **kwargs)
- Parameters
no_display (object) –
Methods
__init__([required, default, validation, ...])- param no_display
get_value(value)Get detailed value of a field
load_value(value)Get value of a field in the Document
to_db(value)Transform the data into a database compatible format
to_display(value[, lazy])Transform the data into display format
validate(value)Validate data
- get_value(value)
Get detailed value of a field
Examples
In the case of a reference, the get value will fetch the data of a reference
- load_value(value)
Get value of a field in the Document
Examples
In the case of a reference, the load value don’t fetch the data and just return the reference id
- to_db(value)
Transform the data into a database compatible format
- to_display(value, lazy: bool = True)
Transform the data into display format
- validate(value)
Validate data