0

I want to add columns to my Django app from frontend. For this, I have created a separate table for table fields but I don't know how can I add a field so that it automatically becomes a field in Contact table and how can i make a dynamic form to ask to fill such inputs. Thanks in advance.

class Contact(models.Model):
    fname = models.CharField(max_length=200)
    lname = models.CharField(max_length=200)
    email = models.CharField(max_length=100)
    mobile = models.CharField(max_length=12)
    address = models.CharField(max_length=200,default=None)
    pincode = models.CharField(max_length=10)
    created_date = models.DateField(auto_now=True)


class Field(models.Model):
    field_name = models.CharField(max_length=100)
    field_type = models.CharField(max_length=50)
    is_required = models.BooleanField()
Arun Jain
  • 44
  • 7

0 Answers0