Django live search | live search using django and javascript

  Рет қаралды 27,548

Pyplane

Pyplane

Күн бұрын

Пікірлер: 63
@Pyplane
@Pyplane 4 жыл бұрын
Hi Guys! Here is the source code for this project: github.com/hellopyplane/Live-search-using-django-javascript
@vidhyanipin
@vidhyanipin 2 жыл бұрын
Hi how to search for images in the database. Like admin can search for users by giving profile pic
@invisiblehumor
@invisiblehumor 2 жыл бұрын
Thanks
@Tanya-ut7zs
@Tanya-ut7zs 4 жыл бұрын
Thanks. This is the first time I tried using Js in django using your video! :)
@coder4551
@coder4551 4 жыл бұрын
Grt video sir. I am almost everytime first in your videos.
@Pyplane
@Pyplane 4 жыл бұрын
Hi Coder ! I'm very grateful for your support :) Thank you!
@JustPython
@JustPython Жыл бұрын
Fantastic video for learning
@stevenha3752
@stevenha3752 3 жыл бұрын
Amazingly simple! Thank you.
@armaanalam65
@armaanalam65 2 жыл бұрын
Amazing simple thank you......
@dhruvilshah9098
@dhruvilshah9098 4 жыл бұрын
Awesome sir liking your content very much
@Pyplane
@Pyplane 4 жыл бұрын
Thank you!
@old4827
@old4827 2 жыл бұрын
Thanks a lot! Nice and simple
@yashrastogi3726
@yashrastogi3726 4 жыл бұрын
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
@anirudhk6109
@anirudhk6109 2 жыл бұрын
great video
@yukselbastan4687
@yukselbastan4687 3 жыл бұрын
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.
@Adroit931
@Adroit931 3 жыл бұрын
it's simply solution to your views add default=str, like that -> json.dumps(list(Model.objects.values()), default=str)
@georgesmith3022
@georgesmith3022 3 жыл бұрын
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
@bharathr5936
@bharathr5936 3 жыл бұрын
Your are simply great
@vasudevareddy5028
@vasudevareddy5028 4 жыл бұрын
Nice sir..keep going,keep posting videos in and around Django..Ur Awesome sir :)
@Pyplane
@Pyplane 4 жыл бұрын
Thank you Vasudeva!
@vasudevareddy5028
@vasudevareddy5028 4 жыл бұрын
What is the extension in VSCode that ur using for organizing Jinja2 code ?
@Pyplane
@Pyplane 4 жыл бұрын
Django by roberth solis
@vasudevareddy5028
@vasudevareddy5028 4 жыл бұрын
@@Pyplane thanks sir :)
@DevsLikeUs
@DevsLikeUs 4 жыл бұрын
Great tutorial, thank you.
@bharathparupati9426
@bharathparupati9426 4 жыл бұрын
Once again....made ur mark luke👍
@Pyplane
@Pyplane 4 жыл бұрын
Hi Bharath. It’s good to see that you are still here :) Cheers!
@liveinpeaceplease
@liveinpeaceplease 4 жыл бұрын
Nice keep more coming 👍
@Pyplane
@Pyplane 4 жыл бұрын
Thank you!
@ahmedkhairy482
@ahmedkhairy482 3 жыл бұрын
Thanks for the great tutorial. I have a question how do I add more complex Django HTML for example {{item.get_absolute_url}} ?
@delllatitude299
@delllatitude299 4 жыл бұрын
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
@Pyplane
@Pyplane 4 жыл бұрын
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 :)
@delllatitude299
@delllatitude299 4 жыл бұрын
@@Pyplane yes please. because i have done this task in datatables which is quite straight forward but i want custom search/autocomplete. Thanks
@everything5240
@everything5240 4 жыл бұрын
as always superb! TEACHER, can we do CRUD operations on single template?
@Pyplane
@Pyplane 4 жыл бұрын
Yes, shouldn’t be a problem :) for update and delete you can use modals to display the form or confirm delete
@yevgenletin5531
@yevgenletin5531 2 жыл бұрын
thanks
@TURKISTONIM2
@TURKISTONIM2 3 жыл бұрын
it is JS bro we need django own search filter can you ??????
@LouisAgyapong
@LouisAgyapong 4 жыл бұрын
Great video. Can you do something on formsets. Like adding forms dynamically to a django formset with javascript.
@Pyplane
@Pyplane 4 жыл бұрын
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!
@ismailashraq9697
@ismailashraq9697 4 жыл бұрын
Will this method cause memory overhead when searching in a large database? Lets say 10k?
@georgesmith3022
@georgesmith3022 3 жыл бұрын
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
@ismailashraq9697
@ismailashraq9697 3 жыл бұрын
@@georgesmith3022 Ive managed to do it efficiently.
@mehedihasanpiash808
@mehedihasanpiash808 3 жыл бұрын
@@ismailashraq9697 How?
@diescatric4559
@diescatric4559 2 жыл бұрын
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
@omarfateh1807
@omarfateh1807 4 жыл бұрын
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 ?
@Pyplane
@Pyplane 4 жыл бұрын
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
@aryakurdo1706
@aryakurdo1706 4 жыл бұрын
Hi thx btw its great tutorial, but is this safe for security I don't think this is that safe
@nastygambler2522
@nastygambler2522 4 жыл бұрын
Mee too i like python and i like tesla... 😁😁 (0:26)
@mehedihasanpiash808
@mehedihasanpiash808 3 жыл бұрын
How to mark/highlight the matched word at the same time while searching?
@TheDinua
@TheDinua Жыл бұрын
How to pass inside js code?
@KrishnaManohar8021
@KrishnaManohar8021 4 жыл бұрын
👌
@duttybwoy556
@duttybwoy556 2 жыл бұрын
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? 🤔😡
@OxMiroslav
@OxMiroslav 4 жыл бұрын
Please, can you share your code (link to github)?
@OxMiroslav
@OxMiroslav 4 жыл бұрын
sorry, this request is already there. Please, ignore.
@eugenetuyizere8857
@eugenetuyizere8857 4 жыл бұрын
Can you share the codes please?
@Pyplane
@Pyplane 4 жыл бұрын
I can't do it at this moment, but later I will upload it to github if you guys need it. Cheers
@eugenetuyizere5231
@eugenetuyizere5231 4 жыл бұрын
@@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
@Pyplane
@Pyplane 4 жыл бұрын
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
@eugenetuyizere5231
@eugenetuyizere5231 4 жыл бұрын
@@Pyplane Thank you a lot
@Pyplane
@Pyplane 4 жыл бұрын
@@eugenetuyizere5231 Thanks for watching!
@72nilayneerav93
@72nilayneerav93 3 жыл бұрын
github repo
Django forms with Ajax | How to use ajax with django
34:30
Pyplane
Рет қаралды 40 М.
Elza love to eat chiken🍗⚡ #dog #pets
00:17
ElzaDog
Рет қаралды 16 МЛН
Human vs Jet Engine
00:19
MrBeast
Рет қаралды 178 МЛН
小丑揭穿坏人的阴谋 #小丑 #天使 #shorts
00:35
好人小丑
Рет қаралды 34 МЛН
Search Products - Django Wednesdays ECommerce 26
21:05
Codemy.com
Рет қаралды 5 М.
Star ratings with Django and JavaScript | part 1 of 2
44:23
Easily Convert Django Function Based Views To Class Based Views
11:58
Create A Search Bar - Django Wednesdays #9
17:04
Codemy.com
Рет қаралды 98 М.
Django live search using Javascript and Ajax
56:35
Pyplane
Рет қаралды 13 М.
Python Django Introduction and Beginners Tutorial
27:29
Dave Gray
Рет қаралды 67 М.
Create a Dependent Select Field in Django With HTMX
14:37
Pretty Printed
Рет қаралды 19 М.
Elza love to eat chiken🍗⚡ #dog #pets
00:17
ElzaDog
Рет қаралды 16 МЛН