Re: django search page not found error

2020-03-26 Thread omid jahadi
How can i handle this exception ... I have this error: "No agents found matching the query" On Thursday, March 26, 2020 at 12:08:14 AM UTC+4:30, Motaz Hejaze wrote: > > No problem , you can catch this exception in your views.py if you want .. > > On Wed, 25 Mar 2020

Re: django search page not found error

2020-03-25 Thread omid jahadi
On Wednesday, March 25, 2020 at 7:00:00 AM UTC+4:30, Motaz Hejaze wrote: > > Add null=True to manytomany field > > > On Wed, 25 Mar 2020, 2:02 am omid jahadi, > wrote: > >> Hello everybody! I want to search in a ManyToManyField in the >> DetailView. It works fine if

django search page not found error

2020-03-24 Thread omid jahadi
Hello everybody! I want to search in a ManyToManyField in the DetailView. It works fine if a user with the same query exist, but if there isn't a user, i get page not found error. models.py: class agents(models.Model): agent_type = models.ForeignKey(types, on_delete=models.SET_NULL,