great work Lucas, many thanks. But I tryed in my Post model where date ar in too and I think it is a problem for json (Object of type date is not JSON serializable). I think ş must find somethink else.
this is not live search, since you download all the objects. It is live filtering. However, if you have thousands of objects you would exhaust all available memory. What you should do a new ajax query each time a keyup event is registered and returning the first 10 results
hi nice tutorial, can we get little bit advance of it. like searching and showing a spinner while getting data from database using ajax, and get results as drop-down on search box when we click on any search item it will go to that post. i hope i tell clearly. Thanks
Hi Louis. Thanks for watching, for the comment & for the suggestion. I have already planned 4 additional videos to this series on django and js, but I'll also consider your idea. Cheers!
When I click on one of the results, is it possible to go the page of the item directly without hitting the search button , like Instagram search ? and how to customize the results , for example adding an image ?
hey where is that box variable coming from????🙄🤔🤔🤔😠 you haven't made a variable that goes like ' let box =document. getElement........' and you haven't done it at all at no point in time , i even checked the base.html file to see if it was there or something because I was literally going crazy trying to find out why that box variable is coming from nowhere and still works, but I couldn't find that variable anywhere..... So it's so confusing and annoying!!!! where does such box-variable come from which is not defined and still works!!!!! ????????????? whereeee? 🤔😡
@@Pyplane Thank you very much. I struggled to use this kind of search. But also need a hint to do in your code so that I can search through different columns in a table instead of a single column
Eugene TUYIZERE hi, if you need a hint it will be to add an additional condition for the text that we type. Here we are only looking at the name, but we could also take a look description. Good luck
Hi Guys! Here is the source code for this project: github.com/hellopyplane/Live-search-using-django-javascript
Hi how to search for images in the database. Like admin can search for users by giving profile pic
Thanks
Thanks. This is the first time I tried using Js in django using your video! :)
Grt video sir. I am almost everytime first in your videos.
Hi Coder ! I'm very grateful for your support :) Thank you!
Fantastic video for learning
Amazingly simple! Thank you.
Amazing simple thank you......
Awesome sir liking your content very much
Thank you!
Thanks a lot! Nice and simple
great video
how to filter on the basis of two attributes in Js ? like i have first_name and last_name as seperate attributes and i want to perform search on it
great work Lucas, many thanks. But I tryed in my Post model where date ar in too and I think it is a problem for json (Object of type date is not JSON serializable). I think ş must find somethink else.
it's simply solution to your views add default=str, like that -> json.dumps(list(Model.objects.values()), default=str)
this is not live search, since you download all the objects. It is live filtering. However, if you have thousands of objects you would exhaust all available memory. What you should do a new ajax query each time a keyup event is registered and returning the first 10 results
Your are simply great
Nice sir..keep going,keep posting videos in and around Django..Ur Awesome sir :)
Thank you Vasudeva!
What is the extension in VSCode that ur using for organizing Jinja2 code ?
Django by roberth solis
@@Pyplane thanks sir :)
Great tutorial, thank you.
Once again....made ur mark luke👍
Hi Bharath. It’s good to see that you are still here :) Cheers!
Nice keep more coming 👍
Thank you!
Thanks for the great tutorial. I have a question how do I add more complex Django HTML for example {{item.get_absolute_url}} ?
hi nice tutorial, can we get little bit advance of it. like searching and showing a spinner while getting data from database using ajax, and get results as drop-down on search box when we click on any search item it will go to that post. i hope i tell clearly. Thanks
Hi. I'll think about it. Those videos on django with javascript have cool statistics so I think I'll make a few more on this :)
@@Pyplane yes please. because i have done this task in datatables which is quite straight forward but i want custom search/autocomplete. Thanks
as always superb!
TEACHER, can we do CRUD operations on single template?
Yes, shouldn’t be a problem :) for update and delete you can use modals to display the form or confirm delete
thanks
Great video. Can you do something on formsets. Like adding forms dynamically to a django formset with javascript.
Hi Louis. Thanks for watching, for the comment & for the suggestion. I have already planned 4 additional videos to this series on django and js, but I'll also consider your idea. Cheers!
it is JS bro we need django own search filter can you ??????
Will this method cause memory overhead when searching in a large database? Lets say 10k?
of course it will, it is live filtering, not live searching. He should do a new search each time a key up is registered and return only 10 results
@@georgesmith3022 Ive managed to do it efficiently.
@@ismailashraq9697 How?
When I click on one of the results, is it possible to go the page of the item directly without hitting the search button , like Instagram search ? and how to customize the results , for example adding an image ?
I’m not sure I understand - we don’t have a search button here. Customize it however you want inside the for loop and in the innerHTML
I got Object of type datetime is not JSON serializable because I have one of attribute is DateTimeField i'm not sure how I can fix this
Hi thx btw its great tutorial, but is this safe for security I don't think this is that safe
Mee too i like python and i like tesla... 😁😁 (0:26)
How to mark/highlight the matched word at the same time while searching?
How to pass inside js code?
👌
hey where is that box variable coming from????🙄🤔🤔🤔😠
you haven't made a variable that goes like ' let box =document. getElement........'
and you haven't done it at all at no point in time , i even checked the base.html file to see if it was there or something because I was literally going crazy trying to find out why that box variable is coming from nowhere and still works, but I couldn't find that variable anywhere..... So it's so confusing and annoying!!!! where does such box-variable come from which is not defined and still works!!!!! ????????????? whereeee? 🤔😡
Please, can you share your code (link to github)?
sorry, this request is already there. Please, ignore.
Can you share the codes please?
I can't do it at this moment, but later I will upload it to github if you guys need it. Cheers
@@Pyplane Thank you very much. I struggled to use this kind of search. But also need a hint to do in your code so that I can search through different columns in a table instead of a single column
Eugene TUYIZERE hi, if you need a hint it will be to add an additional condition for the text that we type. Here we are only looking at the name, but we could also take a look description. Good luck
@@Pyplane Thank you a lot
@@eugenetuyizere5231 Thanks for watching!
github repo