'calculate totals of CSV columns before importing and issuing warning
Using django-import-export, Wanted to import rows into postgresql table only after calculating the total of a particular column of CSV. If it is beyond a limit, want to issue a warning and prevent import else get the page which asks for confirmation of import of this tool. The def
before_save_instance method is only for 1 instance at a time. How can I implement for all the rows of the CSV at a time?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
