mhahnel/Total-Impact — Issue #49: Export formats: download vs json
Author: dartar
Created: 2011-10-26 05:20:16+00:00
State: open

The `render_as_list()` method was generating HTML as opposed to plain text and was (somewhat inconsistently) called by a download button (which suggests an actual download).

I went ahead and modified the behavior of the download handler to force an actual download as a tab-separated file. The file naming scheme and separator should be made configurable (todo added in the code).

I think we should have two separate buttons in the report screen calling two separate handlers with separate HTTP headers and MIME types:

* **Download** to actually force a download in a handy separated format for human consumption
* **JSON** to display the raw JSON response from the DB for machine consumption (and as an interim solution as long as TI doesn't offer an actual API)