Utility to export data from a model. It can export the data in three different file output: csv, xls, xlsx.
JAdmin is NOT dependent from any of these packages. To enable the export in a specific format, it’s necessary to install one or more of these packages. In case unicodecsv is not installed, the function will try to export data using the default csv python package, which cannot, however, grant data integrity in case of unicode strings. In the other two cases, the export won’t work, returning an ImportError.
Whenever any of the packages is installed, the corrisponding action will get enabled into the admin extra_action_form.
For a more precise export of data inside models, it’s possible to extend this class. The default get_data() will parse also methods inside of the export class, enabling the creation of export-specif fields.
Parameters: |
|
---|