About Many-to-many Relationships to Self
In Django, Many-to-many relationships to self are symmetrical by default and create two database entries for each relation.
1 2 3 |
|
This means, that these would work out of the box:
1 2 |
|
And both location1
and location2
would be in the following query:
1 2 3 |
|
Tips and Tricks Programming Architecture Django 5.x Django 4.2 Django 3.2 PostgreSQL MySQL SQLite
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django GDPR Cookie Consent app
For Django websites that use cookies.