I've tried to solve this for a couple of days now and could use a little outside input.
What would be the best way to create Forms for these related models:
STATUSES = (('1', 'Draft'), ('2', 'Active'), ('3', 'Deleted'), ('4', 'Credited'))
class Contract(models.Model):
details = ForeignKey(Order)
status = CharField(max_length=1, choices=STATUSES)
class Product1Order(Order):
items = ManyToManyField(Item)
# + more product specifics
class Item(models.Model):
tag = ForeignKey(Tag)
status = CharField(max_length=1, choices=STATUSES)
price = PositiveIntegerField()
I started looking in to Formsets, but I couldn't really understand the point of using them for this.
If I use ModelForms the status field will collide on ModelA and the ModelC's, and if I want different fields to show up on different pages in my apps, I would have to copy-paste the modelforms to a new modelform and change the Meta-exclude/fields per Form Object?
If anyone have any hints, I'd be very grateful.