let user add columns and entries

Hi people, got an hard question maybe, can’t find anything apparently on google, still searching for it.
In any case i’m trying to build up a form with about 40 fields.

  • 20 of these fields are simple CharText fields
  • 10 of these fields are simple DateTime fields
  • 10 remaining fields are my dilemma.
    For these last 10 field id like to let the user who’s compiling the form, the possibility to:
  • decide the structure of the table ( like: 3 columns. ‘col1’ ‘col2’ ‘col3’
    or 5 columns if he needs to);
  • after adding the columns that he needs, he may also add new entries to the previous table.

I’ll post the model base structure.
( blank lines after ‘=’ means that i don’t know how to fill )
I need to let the user build his own structure.
I may build the columns myself, but it’s better to let him create them by choosing their own structure.

class Incarico(models.Model):
#id = models.AutoField(primary_key=True)
nr_sinistro = models.CharField(max_length=50, default=None)
nr_polizza = models.CharField(max_length=50, default=None)
appuntamento_danno = models.CharField(max_length=50, default=None)
note_pubbliche = models.CharField(max_length=50, default=None)
note_private = models.CharField(max_length=50, default=None)
sinistro = models.DateField(default=None)
incarico = models.DateField(default=None)
perizia = models.CharField(max_length=50, default=None)
pl = models.CharField(max_length=50, default=None)
codifiche = models.CharField(max_length=50, default=None)
studio = models.CharField(max_length=50, default=None)
impiegata =
perito = models.CharField(max_length=50, default=None)
perito_date = models.DateField(default=None)
accertatore =
revisore =
contatto = models.CharField(max_length=50, default=None)
contatto_date = models.DateField(default=None)
sopralluogo = models.CharField(max_length=50, default=None)
sopralluogo_date = models.DateField(default=None)
interloc = models.CharField(max_length=50, default=None)
interloc_date = models.DateField(default=None)
evasione = models.CharField(max_length=50, default=None)
evasione_date = models.DateField(default=None)
mandante =
agenzia =
ispettorato =
ramo =
liquidatore =
assicurato =
amministratore =
broker =
danneggiati =
tipologia_sinistro =
data_incarico = models.DateField(default=None)
note = models.CharField(max_length=500, default=None)

Thanks in advance!