want to be able to do an internal platform for uploading csv files and previewing them. According to different information, we have established about 20 model, and because there are some necessary logic checks, the local csv files are read by called pandas
.what has been implemented so far is the following:
upload from jQuery in the foreground< H2 > question: < / H2 >
upload
after receiving the local address in the background, read it with pandas and give it all back to the foreground json
upload
the backend continues to check the logic, and the foreground presents the table
when the foreground is presented, it will be a complete table, which causes the page to react very slowly and sometimes crash. is there a way to easily paginate when feedback to the foreground?
there are several methods that can be thought of at present
- the foreground marks the paging link. Every time Django receives the link, it reads the local file with pandas, and then slices it back to the foreground .
- each model creates a temporary table. After the pandas is read, it is directly create into the temporary table, and paged back to the foreground with paginator.
- put the table read by pandas into the cache, and return by slicing the pandas table according to the link.
do you have any suggestions to meet the needs? Thank you