[Answered ]-Display objects from inline model in DetailView

1👍

since you are using generic DetailView you can refer to the current object with self.get_object(). actually that return the single object that view display. however you can use instateself.object too.

so you can filter the Product related Resources using Resource.objects.filter(resources=self.get_object(), type='sales')

you can read more Single object mixins

Leave a comment