[Django]-How to define the admin import format for a field using django-import-export

10👍

Following to this code example, you should do something like this:

# ...
class EnrolmentResource(resources.ModelResource):
# ...
class EnrolmentAdmin(ImportExportMixin, admin.ModelAdmin):
    resource_class = EnrolmentResource
# ...
admin.site.register(Enrolment, EnrolmentAdmin)

Leave a comment