pyexcel.Book.save_to_django_models¶
-
Book.
save_to_django_models
(models, initializers=None, mapdicts=None, **keywords)¶ Save to database table through django model
Parameters: - models – a list of database models, that is accepted by
Sheet.save_to_django_model()
. The sequence of tables matters when there is dependencies in between the tables. For example, Car is made by Car Maker. Car Maker table should be specified before Car table. - initializers – a list of intialization functions for your tables and the sequence should match tables,
- mapdicts – custom map dictionary for your data columns and the sequence should match tables
optional parameters: :param batch_size: django bulk_create batch size :param bulk_save: whether to use bulk_create or to use single save
per record- models – a list of database models, that is accepted by