CSVImporter¶
-
class
data_importer.importers.csv_importer.
CSVImporter
(source=None, *args, **kwargs)¶ -
class
Meta
¶ Importer configurations
-
CSVImporter.
clean
()¶ Custom clean method
-
CSVImporter.
clean_field
(field_name, value)¶ User default django field validators to clean content and run custom validates
-
CSVImporter.
clean_row
(row_values)¶ Custom clean method for full row data
-
CSVImporter.
cleaned_data
¶ Return tupla with data cleaned
-
CSVImporter.
errors
¶ Show errors catch by clean methods
-
CSVImporter.
exclude_fields
()¶ Exclude fields from Meta.exclude
-
CSVImporter.
get_error_message
(error, row=None, error_type=None)¶
-
CSVImporter.
is_valid
()¶ Clear content and return False if have errors
-
CSVImporter.
load_descriptor
()¶ Set fields from descriptor file
-
CSVImporter.
meta
¶ Is same to use .Meta
-
CSVImporter.
post_clean
()¶ Excuted after all clean method
-
CSVImporter.
post_save_all_lines
()¶ End exection
-
CSVImporter.
pre_clean
()¶ Executed before all clean methods Important: pre_clean dont have cleaned_data content
-
CSVImporter.
pre_commit
()¶ Executed before commit multiple register
-
CSVImporter.
process_row
(row, values)¶ Read clean functions from importer and return tupla with row number, field and value
-
CSVImporter.
save
(instance=None)¶ Save all contents DONT override this method
-
CSVImporter.
set_reader
()¶
-
CSVImporter.
source
¶ Return source opened
-
CSVImporter.
start_fields
()¶ Initial function to find fields or headers values This values will be used to process clean and save method If this method not have fields and have Meta.model this method will use model fields to populate content without id
-
CSVImporter.
to_unicode
(bytestr)¶ Receive string bytestr and try to return a utf-8 string.
-
class