Skip to content Skip to sidebar Skip to footer

Csv Upload With No Set Format Before Upload

I'm using Django adaptors it works very well however, I'm starting to see CSV uploads where the user can decide what column the data belongs to after upload with no set format befo

Solution 1:

You need to inherit from CSVModel class and extend/overwrite get_fields method (and other methods if needed). This is common pattern for dynamic building instances of declarative classes.

Take a look on this code

ProductForm class, this is not exactly your case, but the point is the same.

Post a Comment for "Csv Upload With No Set Format Before Upload"