Hi everyone, I am working on a project that requires a base form + template for every user, based off of a simple model as such…
class FloorPlan(models.Model):
user = models.ForeignKey(account)
stories = models.IntegerField()
bathrooms = models.IntegerField()
sqft = models.IntegerField()
I know that JS will be needed to make this dynamic.
So every user will have a base form and view, which displays just those 3 fields. Now I also want this form to be customizable in a sense to let the user add any extra fields, or also remove fields that are not used. Maybe they add backyard info, pool info, etc.
I came across this app,
but doesn’t seem to fit what I need.
I was thinking of adding an extra field called extra_field=models.ForeignKey(ExtraField)
in the FloorPlan
model, and make it a m2m, and in the ExtraField
model just store the new fields the user wants to create. But design wise, dont think this would be best to let every user flood the DB?
I’ve been looking around to find maybe a JS library too.
Really just looking for some advice if anyone has created something similar, just looking for some pointers in the right direction.
TY in advance!