Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As an admin, I want to export a custom CSV after searching in the backend so that I can use the backend’s search functionality to create targeted data sets. #444

Closed
6 tasks done
rlskoeser opened this issue Jul 27, 2022 · 3 comments
Assignees
Milestone

Comments

@rlskoeser
Copy link
Contributor

rlskoeser commented Jul 27, 2022

testing notes

in django admin digitized work list view:

  • try exporting all records; should work similar to before, except that you'll have to choose which format you want
  • try selecting a subset of records from the list view and use the action to export

second round testing:

  • clusters are next to collections and output cluster id instead of database id
  • downloading all records should be a bit faster than before

Note: the field/column names in the new export are based on the field names in the code, which is a change from our previous export CSVs; I would prefer to keep them this way, because it will be much easier for anyone working with the exports in code. If you feel strongly about it I can add logic to override the labels so they match what they were previously.

dev notes

  • Remove old DigitizedWorkCSV view and links
  • configure and use django-import-export; use the same fields as the existing csv export
@rlskoeser rlskoeser added this to the v3.8 milestone Jul 27, 2022
@rlskoeser rlskoeser self-assigned this Aug 18, 2022
@rlskoeser
Copy link
Contributor Author

Decreasing from 2pts to 1 because django-import-export was so straightforward to set up.

@mnaydan
Copy link
Contributor

mnaydan commented Aug 19, 2022

Exporting all records works great (takes a few seconds to download, but lag time isn't too bad) - I tried xlsx and csv. I think it's fine to keep the name labels as is matching the code.

One thing: There's a cluster column, but instead of the alphanumeric IDs we gave them, they're all numbers. You mentioned this was because you forgot to exclude cluster, but it might be good to keep cluster on the export and show the alphanumeric IDs we input, if possible? And could we move it near collections?

Exporting a subset after searching is SO powerful! I tested with "ballad" and with "for use in schools." It successfully works via the action button and via the export button.

@mnaydan
Copy link
Contributor

mnaydan commented Aug 23, 2022

This looks great! Thank you for making the adjustments to the cluster column. I retested exporting the full set and a subset after search. (FYI, the speed still isn't great for the full set but it's not horrendous.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants