[Django]-How to use 'select_related' with get_object_or_404?

298👍

Yes.

obj = get_object_or_404(MyModel.objects.select_related(), whatever=whatever)

Leave a comment