Selecting related objects is totally confusing

can any1 simplify or summarize the topic with example please?

Same here. Where I am confused, we are showing how to prefetch_related(‘promotions’) , but are never shown how to actually display the results. I can see it in the SQL panel, but how do I actually show the results on the page? That is a key piece of missing information. I’ve been trying to figure it out all day.

1 Like

Hey, just see if this helps you. After prefetching the data, use the Iterator**.<class_name>.**<the_value> that you want to print.

{{ prod.title }} – Colection {{ prod.collection.title }} – Promotion {{ prod.promotion.discount }}