Results
Result
- class import_export.results.Result(*args, **kwargs)
- error_rows
The collection of rows which had generic errors.
- failed_dataset
A custom Dataset containing only failed rows and associated errors.
- has_errors()
Returns a boolean indicating whether the import process resulted in any critical (non-validation) errors for this result.
- has_validation_errors()
Returns a boolean indicating whether the import process resulted in any validation errors for this result.
- invalid_rows
The collection of rows which had validation errors.
- rows
The rows associated with the result.
RowResult
- class import_export.results.RowResult
Container for values relating to a row import.
- diff
A HTML representation of the difference between the ‘original’ and ‘updated’ model instance.
- errors
An instance of
Error
which may have been raised during import.
- import_type
A string identifier which identifies what type of import was performed.
- instance
A reference to the model instance which was created, updated or deleted.
- is_delete()
- Returns:
True
if import type is ‘delete’, otherwiseFalse
.
- is_error()
- Returns:
True
if import type is ‘error’, otherwiseFalse
.
- is_invalid()
- Returns:
True
if import type is ‘invalid’, otherwiseFalse
.
- is_new()
- Returns:
True
if import type is ‘new’, otherwiseFalse
.
- is_skip()
- Returns:
True
if import type is ‘skip’, otherwiseFalse
.
- is_update()
- Returns:
True
if import type is ‘update’, otherwiseFalse
.
- is_valid()
- Returns:
True
if import type is not ‘error’ or ‘invalid’, otherwiseFalse
.
- object_id
The instance id (used in Admin UI)
- object_repr
The object representation (used in Admin UI)
- original
A reference to the model instance before updates were applied. This value is only set for updates.
- row_values
Retain the raw values associated with each imported row.
- validation_error
Contains any ValidationErrors which may have been raised during import.
InvalidRow
- class import_export.results.InvalidRow(number, validation_error, values)
A row that resulted in one or more
ValidationError
being raised during import.- property error_count
Returns the total number of validation errors for this row.
- property field_specific_errors
Returns a dictionary of field-specific validation errors for this row.
- property non_field_specific_errors
Returns a list of non field-specific validation errors for this row.