Add data to Django form class using modelformset_factory
- by dean
I have a problem where I need to display a lot of forms for detail data for a hierarchical data set. I want to display some relational fields as labels for the forms and I'm struggling with a way to do this in a more robust way. Here is the code...
class Category(models.Model):
name = models.CharField(max_length=160)
class Item(models.Model):…