I played with import-import django because it seems like the obvious choice for any import / export related to django and it is fantastic. The problem is that I cannot find much information about the documents on the import side, and I would like to be able to use it to import data and deal with table relationships.
For example, I have a system for a cyclic event, and the event has a table of various places controlled by the user. I would like this user to be able to import the information file for the people who will fill these places.
The places where the user has FK for another table for cyclists in this case, and the downloaded file will contain cyclist details. However, cyclist objects may not yet exist.
I work with django-import-export from an administrator point of view, targeting certain model objects by ID from CSV, but is it possible to deal with object relations?
My idea was that in terms of where the user can see their places in the event and each time add the cyclist individually or download the CSV file, they can also download the CSV file. This will contain an identifier for each seat and a column for each piece of cyclist information I want to provide.
I know from the export side of this, I was able to point place__cyclist__nameout to get the name of the cyclist associated with the place. Is it possible to import data?
source
share