[WIP] Adding query widget functionality to export#54
[WIP] Adding query widget functionality to export#54ironmaniiith wants to merge 22 commits intomasterfrom
Conversation
|
Which one?
I'll add the details of this PR
Yeah, this was just a basic working code that I pushed. I'll modify it. As my current priority, I'm looking at how to make the zip file download thing working
There were too many forms that I've seen from several libraries, not sure which form exactly to use here so I implemented it like this. I don't know which form you are refering to which already exists? Also in the currrent implementation of import-export page, a template is used which however we dont have to use here. Questions:
|
652be2c to
d1540bd
Compare
Fixed bugs from the previous commits Renamed handleApply method to handleExport method in `exportform.py`
7239257 to
2109f80
Compare
|
I just checked the contents of the zip file. Seems like I'm able to export the correct contents by using setBody (here), however, I can't have the actual zip contents in the body, doing which leads to an error related to encoding decoding. If I convert it to base64 encoded contents, the zip that gets exported is also simply a file with the same base64 content (and not the actual zip content) |
|
The current commit resolves all the errors related to zip file downloading and currently we have a working portal which is able to export the contents which are selected as part of the query widget. Here is a small demo video for the working functionality: https://streamable.com/crpw8 Alternative link |
|
@ironmaniiith that's very well done. |
Thanks @Shriyanshagro
Yeah, I think this will cover all the stories that were there in the doc related to export.
I was actually just experimenting with the query widget for just one field in the CSV. The main target at the time was to get the working code which will be able to cover the majority of the stories. Also I was trying to resolve the other issues which were the major blocker previously. I'll add that part in. I infact had that already in my TODO list |
d7b7b84 to
fcbd101
Compare
This hides the section of Import from frontend, whcih will be added later
… helper function for dynamic vocabularies
…metadata `@type` At this point functionality of export data along with providing choice for metadata to export is working
Creates zope.schema terms for vocab out of given items
Preserve path is a boolean field, when set to True exports the file contents as per their respective paths in the site setup. Export type is used to determine which type of contents (whether only files, only csv, or both) should be exported
|
Work done in this PR:
Improvements done while completing this PR
Note
Video links: |
Remove the MUST_INCLUDED_ATTRIBUTES altogether in later version of the code
Moved extracting the headers into a different helper function
…selected metadata` to `Exclude selected metadata`
Description (will update according to progress made): The current export functionality simply exports everything that is present in the site and doesn't give the flexibility to choose the content of interest that needs to be exported. For this, a query widget is added, using which a user can use it to filter out the contents which he/she is interested in and can export only that limited content.
Currently, the content of this PR is accessible at@@export-formurl. Upon completion, this will be moved to the main export section of@@import-exportand the existing code will be modified accordinglyUpdate: The content is already moved to
@@import-export