django-import-export / django-import-export

Django application and library for importing and exporting data with admin integration.

Home Page:https://django-import-export.readthedocs.org/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Default field set differs during import in v4

matthewhegarty opened this issue · comments

Describe the bug

in v3, all model fields are presented during import:

image

In v4, only certain model fields are presented, even when no fields attribute is defined.

image

To Reproduce

Import the books.csv file using the Admin console.

Versions (please complete the following information):

  • Django Import Export: 4.0.1
  • Python 3.11
  • Django 5.0.2

Expected behavior

For consistency with v3, we should see all default fields presented.

@matthewhegarty I could not reproduce this. You mention importing books.csv but screenshot looks like E-books import (it has author field). Without digging deeper, it seems fields that are presented are defined with Resource class and not import file headers.

Ah good point - thanks for checking. I'll check again later and close if I cannot reproduce.

Yes, it looks ok when importing a file to Book

image