Re: ResultSet with query on multiple models

2019-08-24 Thread Catalina Popescu
Hey, Benoit You could set up a filter on your admin.py file. Like writing: class Immunization(admin.ModelAdmin): list_filter = ('vaccine', 'recorded') On Friday, August 23, 2019 at 2:19:35 PM UTC+3, Benoit Dupont wrote: > > Hello, > > I've played a lot of time with Django and it's a great

Re: ResultSet with query on multiple models

2019-08-24 Thread Benoit Dupont
I think I have figured it out. I have to play with models.Prefetch() to restrict the results from the prefetch_related() Can someone confirm this is the right way to do it ? Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To

ResultSet with query on multiple models

2019-08-23 Thread Benoit Dupont
Hello, I've played a lot of time with Django and it's a great tool for basic query but I don't figure out how to play with Django to do a query spanning between a lot of models. This is the query I do to display all Animals and their corresponding Vaccines with Encounter.status