About Adding Extra Field Values to Many-to-many Relations
To add extra fields to the many-to-many relation, you can use the through
model. When you add an object to the relation, the extra fields can be added via through_defaults
attribute:
1 2 3 4 5 6 7 8 9 10 11 12 |
|
Here the models of the readinglist
are defined as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
|
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django App for You
Django GDPR Cookie Consent app
For Django websites that use cookies.
Django App for You