thomst / django-admin-csvexport

A django-admin-action to export models as csv
BSD 3-Clause "New" or "Revised" License
17 stars 9 forks source link

Supported custom fields #2

Closed nnseva closed 4 years ago

nnseva commented 4 years ago

The supported field types list was restricted. This PR allows extending this list.

thomst commented 4 years ago

@nnseva: Thank you for the pull request. Actually I plan to refactor the supported-field logic. We probably don't need this kind of restriction, if we just check for subclasses of models.Field and exclude ForeignKeys and ManyToManyFields. All fields that are not a relation of any kind should return a value that makes sense as csv-column.

But for now your solution is fine.

thomst commented 4 years ago

Version 1.7 supports custom fields without the need to list them in the settings.