How To Django: Blog Application - Create A Basic Search In Django

preview_player
Показать описание

Welcome back to another How To Django tutorial, in today's tutorial we will look at how to create a basic search in Django. Using Q and icontains.
Рекомендации по теме
Комментарии
Автор

Thank you so much, you saved my projects life

yunga
Автор

Excellent tutorial, keep up the good work my friend.

caesargamer
Автор

Hey bro, you need to put a CSRF token inside the form. I was also hoping to see this implemented as a class-based view, but that's not a big deal. DON'T FORGET THE CSRF TOKEN!!!

sciencecompliance
Автор

Great tutorial ...
You are just a super django developer..
Could you please make a play list about django practice ..like
"12 web app in 12 week " challenge that based on rails and its about making clones of a famous websites ..

faresgeek-dz
Автор

do u have a source code of this?
Can i have it

TungNguyen-fmbt
Автор

I forgot to put request in the arguments of search() .Silly me!

RamisaAnjum
Автор

The category is af Foreign key in the model and when I try to make Q(category__icontains=query) the page comes with this error: Related Field got invalid lookup: icontains and it is not possible to search for any of the categories from my database. Is there a speciel way you have to do it with the foreign keys or can anyone help me?

menjaholmwettergren
Автор

Nice vid, but my pal Lorenz does not enjoy function based views

anderoraava
Автор

ok it's good, but if we do without pagination then it is showing all posts including which are not matching

nikhilbhardwaj
welcome to shbcf.ru