Open robinzachmann opened 2 months ago
foo = Foo.objects.all().get() foo.bar # <-- this will silently cause a sub-query
Create a function for safely accessing foo.bar which complains if the attribute would cause an extra query.
foo.bar
The problem
Idea
Create a function for safely accessing
foo.bar
which complains if the attribute would cause an extra query.