4 ms·
Django's orm seems to aware of some of it's weaknesses, you can actually write your own queries and return the data as a queryset (with your models) instead of
by wizard_2 16y ago
Django's orm seems to aware of some of it's weaknesses, you can actually write your own queries and return the data as a queryset (with your models) instead of just a dictionary or list of data. I use that to filter some records on a many to many join that was based on a shared field instead of a 3rd table and was happy with the results.
Before trying that out I actually built the 3rd table which while it only has 3 columns (id, fk1, fk2) is probably the largest tables I've ever had to use with around 10 million rows. The django orm spent many hours building those relations, my custom sql spent about 5 minutes. Sometimes when you have hammer....
I can't take credit for the clean app boundaries, it's either python or django that lends itself to it. The apps I've written have to have clean boundaries if I want to use the community apps. But thank you anyway, it's been a lot of fun learning all of this and the community has been very helpful.