You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@airavata.apache.org by "Marcus Christie (Jira)" <ji...@apache.org> on 2020/07/23 16:44:00 UTC

[jira] [Commented] (AIRAVATA-3354) Wagtail: better handling exporting/importing of images and documents

    [ https://issues.apache.org/jira/browse/AIRAVATA-3354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17163757#comment-17163757 ] 

Marcus Christie commented on AIRAVATA-3354:
-------------------------------------------

Some research I've done so far:
- store the image files in the database as a blob
   - https://django-db-file-storage.readthedocs.io/en/master/ can be used to get images stored as database blob
   - then would need to customize the wagtail image model https://docs.wagtail.io/en/stable/advanced_topics/images/custom_image_model.html
- Django doesn't support dumping file content with `dumpdata` https://code.djangoproject.com/ticket/20979
   - tried https://django-filer.readthedocs.io/en/latest/index.html, but I guess you need to use their models to get dumpdata to dump file contents
- https://github.com/torchbox/wagtail-import-export and https://github.com/berkalpyakici/wagtail-import-export-tool are interesting, but they don't handle files either
   - I should say, it doesn't look like they handle file contents either from looking at the code, but https://github.com/berkalpyakici/wagtail-import-export-tool would be a good thing to try out


> Wagtail: better handling exporting/importing of images and documents
> --------------------------------------------------------------------
>
>                 Key: AIRAVATA-3354
>                 URL: https://issues.apache.org/jira/browse/AIRAVATA-3354
>             Project: Airavata
>          Issue Type: New Feature
>          Components: Django Portal
>            Reporter: Marcus Christie
>            Assignee: Marcus Christie
>            Priority: Major
>
> When a new set of wagtail pages are created (a "theme"), we can export those pages into a json file that can then be loaded into a separate Django portal instance. This works pretty well for developing a library of themes or for exporting/importing a set of wagtail pages to a different Django portal instance. However, we don't have a good way to export wagtail images (and documents, although I don't think we use those in our themes). What we currently do is we commit those images into the media directory of the repository. However, this tends to bloat the repository over time and any Django portal instance will only use a fraction of the images there.
> Ideally, we would be able to produce an export of the Wagtail pages that includes the page content plus any files like the images and documents.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)