Skip to content

Using django-polymorphic with django-import-export #342

@ShaheedHaque

Description

@ShaheedHaque

I'm trying to use polymorphic models with the Admin import-export support provided by django-import-export. I've not (yet) looked into how this project does it's work, but a quick test reveals that the saved .csv file does not contain the fields from the subclass models (the saved data DOES contain the polymorphic_ctype as one might hope).

Now, I realise that the saved format of the data is a slightly tricky problem, especially if you have multiple levels of inheritance because the flat (relational-like!) format of a .csv file does not lend itself to the variable nature of the fields/columns. Maybe something like JSON encoding of the child fields might be needed?

At any rate, it would be nice to have this integration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions