Open
Description
By moving the staticmethods on Handlers
to the models (or managers) they convert, they can be tested together with that model, partially solving #1867 for /bin/navdump
.
Also, when the definition of the export format is kept in the same file as the model, propagating changes from the model to the format is easier.
I suggest:
- Header as attribute on model
- Model.export_csv() for a single model.
- queryset.export_csv() for a queryset().
Maybe standalone functions being reused by 2 and 3, export_csv_<model>
, or maybe drop 2 and only do 3.