Field(attribute=None, column_name=None, widget=None, default=<class django.db.models.fields.NOT_PROVIDED>, readonly=False)¶
Field represent mapping between object field and representation of this field.
- attribute – A string of either an instance attribute or callable off the object.
- column_name – Lets you provide a name for the column that represents this field in the export.
- widget – Defines a widget that will be used to represent this field’s data in the export.
- readonly – A Boolean which defines if this field will be ignored during import.
- default – This value will be returned by
clean()if this field’s widget did not return an adequate value.
Translates the value stored in the imported datasource to an appropriate Python object and returns it.
Returns value from the provided object converted to export representation.
Returns the value of the object’s attribute.