torchbox / wagtail-wordpress-import

A package for Wagtail CMS to import WordPress blog content from an XML file into Wagtail
MIT License
44 stars 16 forks source link

Fixes a bug present on windows, which does not support the delete key… #170

Closed jlchilders11 closed 1 year ago

jlchilders11 commented 1 year ago

This fix corrects an issue with the named temporary file in the xml importer.

This issue is caused by the use of the NamedTemporaryFile from Django's implementation, which is not meant for external use and does not implement several keywords: https://code.djangoproject.com/wiki/NamedTemporaryFile

The other option for this solution would be to use the python language named temporary file, which may not work properly on windows systems as well: https://docs.python.org/3/library/tempfile.html