Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import/Export field not displaying well. #385

Closed
edmundrotimi opened this issue May 14, 2024 · 1 comment
Closed

Import/Export field not displaying well. #385

edmundrotimi opened this issue May 14, 2024 · 1 comment

Comments

@edmundrotimi
Copy link

edmundrotimi commented May 14, 2024

Thanks for this amazing admin template theme. I encountered an issue with the display of my import/export field. The drop-down menu is not formatted well. I am using Django 4.2 and have added a snapshot of my admin.py below. I will appreciate a pointer on what I am doing wrong.

from import_export import resources
from import_export.admin import ImportExportModelAdmin
from unfold.admin import ModelAdmin


class CustomResource(resources.ModelResource):

    class Meta:
        model = MyModel
        skip_unchanged = True
        report_skipped = True
        exclude = [...]
        import_id_fields = [...]
        export_id_fields = [...]


class TestAdmin(ModelAdmin, ImportExportModelAdmin):
    resource_class = CustomResource
    ...
    ...

Screenshot 2024-05-14 111241

@lukasvinclav
Copy link
Contributor

You are missing second step from the link below (import_form_class and export_form_class)

https://github.com/unfoldadmin/django-unfold?tab=readme-ov-file#django-import-export

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants