Django Admin Forms with additional fields in ManyToMany relations
Question:
I have 2 Entities with a ManyToMany Relation and some additional fields, here you can find an example diagram:
I created all models following the documentation and everything works, but I would also manage MTM relations using django admin without use another form to create a new “WheelsCar” row that links togheter a car and a wheel. Is it possible? How?
Admin use case:
- I click on add new Car
- I select one of the wheels, filling the additional fields (position, holes…)
- Iterate step 2
- Save a New Car
Answers:
I got it, I have to use Inline Fields!
Antonio, I don’t understand your response of Inline Field.
Maybe the documentation changed?
I have 2 Entities with a ManyToMany Relation and some additional fields, here you can find an example diagram:
I created all models following the documentation and everything works, but I would also manage MTM relations using django admin without use another form to create a new “WheelsCar” row that links togheter a car and a wheel. Is it possible? How?
Admin use case:
- I click on add new Car
- I select one of the wheels, filling the additional fields (position, holes…)
- Iterate step 2
- Save a New Car
I got it, I have to use Inline Fields!
Antonio, I don’t understand your response of Inline Field.
Maybe the documentation changed?