Product import/export format and mimetype fix

Issue #259 resolved
Doug Fritz
created an issue

I'm getting my product export working and noticed the following problems in the ProductExportForm.export method:

The format is not set correctly, instead a boolean equals test is made on line 64.

The mimetype is not set correctly for zip files (a value of text/zip is passed to the browser, rather than application/zip).

I've attached a patch fixing these two minor bugs.

Comments (3)

  1. Doug Fritz reporter

    I'm reopening this ticket as the mimetype is still hoarked up. In 1041 it was made to be:

    response = HttpResponse(mimetype=mimetype + format, content=raw)

    Which yields things like `text/yamlyaml` and `application/zipjson`.

    The latest patch fixes the code plus adds a unit test to confirm the response content types are correct for all supported formats: yaml, json, xml, python, and zip.

  2. Log in to comment