[Answered ]-Django: Best way to join data from multiple, associate models

2👍

You can do:

objs = A.objects.select_related().all()
for a in objs:
    print(a.name, a.meta.n_views, a.meta.created)

which will let Django construct a query that queries for both A objects and Meta objects.

Leave a comment