Re: Queying 3 tables in Django

2023-05-17 Thread Oduwa Imade
I want to say thanks to all respondents. I got my code working now. I picked up Python/Django about 3weeks and one of the best decisions I've made so far is joining this community. Gracias! On Saturday, May 13, 2023 at 10:55:36 PM UTC+1 Oduwa Imade wrote: > Hello Guys! How do I write a model q

Re: Queying 3 tables in Django

2023-05-13 Thread _M_A_Y_A_N_K_
You could follow the steps below. - Create a view function that takes the search parameter as a keyword argument. - Use the QuerySet object to filter the Skill table by the search parameter. - Use the prefetch_related() method to load the Recruitment objects associate

Queying 3 tables in Django

2023-05-13 Thread Oduwa Imade
Hello Guys! How do I write a model query in django python to get the User details(Recruitment) when i pass a search parameter( skill) to the Skill table? class Recruitment(models.Model): fname = models.CharField(max_length=50) lname = models.CharField(max_length=50) address = models.