[Django]-How to get related model in template?

8👍

Try it:

{{ m.model_2_set.all }}

You can change model_2_set if you define the related name. There is not changes if this is in template or in a view

👤Goin

Leave a comment