diff --git a/django_diu/import_command.py b/django_diu/import_command.py index ffee7c318673200f5b4c6cfd5bbeba5fc8ae0a8f..37179686aec6b98685ae647929b065ca006da04a 100644 --- a/django_diu/import_command.py +++ b/django_diu/import_command.py @@ -76,6 +76,9 @@ class ImportTask(object): def post_process(self): pass + def pre_process(self): + pass + def _process_rows(self, rows, progress=None): for row in rows: try: @@ -105,6 +108,7 @@ class ImportTask(object): def _run_import_loop(self): self.open_data_source() self.count_source() + self.pre_process() if self.progress_bar is True: with click.progressbar(length=self.source_count, label='Importing ' + self.description + ' (' + str(self.source_count) + ' rows to process).') as progress: