Skip to content

Move /bin/navdump Handlers methods to the models they are for #1868

Open
@hmpf

Description

@hmpf

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:

  1. Header as attribute on model
  2. Model.export_csv() for a single model.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions