On maandag 2 juli 2018 21:33:35 CEST hardik dadhich wrote:
> Can anyone tell me how can I make dynamic Django model fields? I mean to
> say that I want to save excel file data in Django model using MySQL. and
> excel column can vary. The user can upload 100 column table or he can be
> upload 1000 column table in the database. so it is possible to add
> dynamically in db.
It makes little sense to store this in a database, because you cannot define relations for what you don't know about. But if you must ...
One way to do this is to use the EAV data model. This is because at 1000 columns = 1000 fields, you will most certainly hit MySQL's maximum row size.
--
Melvyn Sopacua