How to load more data on a button click in Django and Javascript

  Рет қаралды 29,076

Pyplane

Pyplane

Күн бұрын

Пікірлер: 75
@Pyplane
@Pyplane 4 жыл бұрын
Hi Guys. I decided this time to put in the source code on my blog (hope you don't mind). Here is the link: tinyurl.com/y24upc2t Cheers!
@shubhamjha5738
@shubhamjha5738 3 жыл бұрын
you should use white theme of vs code, it hurts.
@kudusbanna1439
@kudusbanna1439 Жыл бұрын
I found this channel about 4 months ago. Your videos have really transformed me a lot. I started as an absolute beginner and I'm always here at least 50 hours a week. Keep up the good job. I wish I found this channel earlier. Much love from Ghana.
@Pyplane
@Pyplane Жыл бұрын
Thank you! Glad you enjoy my content 🙌
@anselsolomon6270
@anselsolomon6270 3 жыл бұрын
Love you so much for this awesome tutorial...
@LouisAgyapong
@LouisAgyapong 4 жыл бұрын
I wish I could just give you a million views. You're just awesome, Keep supporting the Django community in your own way.
@Pyplane
@Pyplane 4 жыл бұрын
Thank you Louis for such nice words ! :)
@crrbioinfomatics8607
@crrbioinfomatics8607 4 жыл бұрын
Great stuff as always. Ready to dig through this video!
@Pyplane
@Pyplane 4 жыл бұрын
Hi! Thanks for watching and for the comment. Very happy to read that you enjoy my tutorials. Cheers!
@greetingsgentlemen.8179
@greetingsgentlemen.8179 3 жыл бұрын
@@Pyplane Hey! How can I put images into it? The innerHTML part. Because I had something like this. {{ post.header.url }} so I tried changing it to this. ${post.header.url} but it did not work. Previous one. Is there another way to do this?
@dhruvilshah9098
@dhruvilshah9098 4 жыл бұрын
Awesome Video sir day by day learning new things. Want many more....
@Pyplane
@Pyplane 4 жыл бұрын
Thank you Dhruvil!
@dj_ovosh
@dj_ovosh Жыл бұрын
Very good tutorial
@borabaki6517
@borabaki6517 2 жыл бұрын
Good job :) it worked for me a lot.
@yukselbastan4687
@yukselbastan4687 4 жыл бұрын
Don't stop Lukas, don't stop we need more Themas. Great Video.
@Pyplane
@Pyplane 4 жыл бұрын
Thank you Yuksel. If everything will go well I'll publish 2-3 more videos this week! Cheers
@danielnolan320
@danielnolan320 4 жыл бұрын
Another awesome video Luke. Have been dying to learn this! Thank you so much!
@Pyplane
@Pyplane 4 жыл бұрын
Hi Daniel. I'm very happy to read your comment. If everything goes well today I'll publish tutorial on cropping images that you requested :) Cheers!
@danielnolan320
@danielnolan320 4 жыл бұрын
Oh wow that was fast! I can't wait to check that one out too. You're the best Luke!
@ndivhuwosithole1220
@ndivhuwosithole1220 3 жыл бұрын
Thank you for all the content, we appreciate it and please keep publishing such great content
@Pyplane
@Pyplane 3 жыл бұрын
Thanks for the nice words! I'm very pleased you enjoy my videos. Cheers!
@sharathsasidharan3125
@sharathsasidharan3125 3 жыл бұрын
This is Amazing, is it there with only pure javascript and ajax?
@ermalgashimramori
@ermalgashimramori 3 жыл бұрын
Great and very valuable content. thank you!
@Pyplane
@Pyplane 3 жыл бұрын
thank you!
@rajughorai3909
@rajughorai3909 4 жыл бұрын
hey will it be good idea to use async with django orm
@farzinsh7
@farzinsh7 Жыл бұрын
Thanks for your awesome video, there is something that I need to know how can I get post.image.url if I had an imageField in my model because when I added it to my code instead of URL show me undefended
@gouthamgoutham7640
@gouthamgoutham7640 3 жыл бұрын
Sir if we are getting files like videos and photos from json respons what we need to do ??? and this is awsome blog sir I have learned a lot
@enide6194
@enide6194 3 жыл бұрын
Thank you for the content! But i have one question: How should i add DetailView to a Post, and how should i call get_absolute_url method in ajax?? Thank you very much.
@paborlouise319
@paborlouise319 4 жыл бұрын
Incredible... 👍🏻
@Pyplane
@Pyplane 4 жыл бұрын
Thank you Pabor!
@PE4ENAROBOTV
@PE4ENAROBOTV 3 жыл бұрын
thank you so much
@АбеНиш
@АбеНиш 4 жыл бұрын
Great vid, helped a lot
@Pyplane
@Pyplane 4 жыл бұрын
Hi Ognjen! I'm happy it helped you out :) Cheers!
@KichajacaKoniczyna
@KichajacaKoniczyna 4 жыл бұрын
Bardzo dobry kanał! Bardzo się cieszę że tu trafiłem :) Czy w tym programie w .js konieczne jest używanie jQuery? Chodzi mi o $.ajax., da się to zrobić bez tego w jakiś sposób? Narazie skupiłem się na django i pythonie, a umiem tylko podstawy stąd też te pytanie, z jQuery za bardzo do czynienia nie miałem (przynajmniej narazie)
@Pyplane
@Pyplane 4 жыл бұрын
cześć. dzięki za miłe słowa :) bez jquery możesz użyc XMLHttpRequest. Pozdr.
@PP-tc1zp
@PP-tc1zp 4 жыл бұрын
Witam Rodaka Zgadza się. Łukasz po prostu wymiata, można się sporo nauczyć tutaj. Jeśli dasz radę uruchomić apkę z redisem crypto to daj znać, bo nie wiem gdzie robię błąd
@danielnolan320
@danielnolan320 4 жыл бұрын
Hey Luke, quick question. What if the posts we want to upload contain a lot of markup. For example my posts contain static files, javascript code, context variables etc. How do we use this method to display posts like these?
@Pyplane
@Pyplane 4 жыл бұрын
Hi Daniel. I'm not sure I understand the problem. What issues do you have?
@danielnolan320
@danielnolan320 4 жыл бұрын
Sorry, it is just that my markup is very long, so I was wondering if there was another way to display posts instead of using the innerHTML property.
@Pyplane
@Pyplane 4 жыл бұрын
@@danielnolan320 You'll have to do your own research on that - I do it as presented in the videos. Good luck!
@danielnolan320
@danielnolan320 4 жыл бұрын
Ok, thanks
@dilipspk
@dilipspk 4 жыл бұрын
Will it wirk properly if it will take more time to fetch data from server if slow Internet???
@Pyplane
@Pyplane 4 жыл бұрын
I don't know what you mean by that. You need to set the spinner to spin until you get the data.
@sharathsasidharan3125
@sharathsasidharan3125 3 жыл бұрын
will you do this the same with pure javascript and ajax, any help would be really appreciated, Thanks!
@WandererBhavish
@WandererBhavish 2 жыл бұрын
What is there is base.html file and how you use js file in your html?
@jaqimughal9821
@jaqimughal9821 4 жыл бұрын
Plz make more videos on Django python 😍
@Pyplane
@Pyplane 4 жыл бұрын
I will ! The goal is to publish minimum 2 videos per week :) Cheers!
@rangabharath4253
@rangabharath4253 4 жыл бұрын
Awesome 😊👍
@Pyplane
@Pyplane 4 жыл бұрын
Thank you Ranga! It seems like I can always count on you :) Cheers!
@DipayanDas773
@DipayanDas773 3 жыл бұрын
13:50 when I am trying to add visible to the url as -- '/posts-json/${visible}/ it gets processed as $%7Bvisible%7D and throws an error, I found a workaround --- '/posts-json/'+visible Anyone else has this problem?
@Pyplane
@Pyplane 3 жыл бұрын
are you using backticks - `` ? The single quotations won't work here
@DipayanDas773
@DipayanDas773 3 жыл бұрын
@@Pyplane Thanks for the answer. I will try and let you know
@Pyplane
@Pyplane 3 жыл бұрын
@@DipayanDas773 in case of problems you can always reference the source code :)
@DipayanDas773
@DipayanDas773 3 жыл бұрын
@@Pyplane it works! Thanks for the solution. I have one small issue though. My ajax call is kinda slow. After clicking something, it takes between 500 millisec to 1sec. and sometimes it doesn't load the data. Have you ever experienced something like this?
@AkshayKaushik
@AkshayKaushik 4 жыл бұрын
Awesome!👍🎯
@Pyplane
@Pyplane 4 жыл бұрын
Thank you Akshay!
@vlad-designs
@vlad-designs 3 жыл бұрын
What's the point of the spinner? Doesn't it just delay the data being displayed? Other than the looks, it doesn't actually give the program some time to load the data?
@satish7931
@satish7931 2 жыл бұрын
yeah ideally on button click, we should make spinner visible and after ajax response we should make it invisible instead
@vishwajeetbhagat9547
@vishwajeetbhagat9547 4 жыл бұрын
Sir, how to do for the NEXT and PREVIOUS button to get one by one posts
@tinylittleanj2
@tinylittleanj2 4 жыл бұрын
Have a look at pagination
@heyoufellow
@heyoufellow 4 жыл бұрын
Do you know how we can prevent from unwanted requests? Because now its easily to just get all database records
@jaqimughal9821
@jaqimughal9821 4 жыл бұрын
Awesome
@Pyplane
@Pyplane 4 жыл бұрын
thank you! :)
@vinothv1720
@vinothv1720 4 жыл бұрын
Can you please do a tutorial on notifications? Like, showing the number of changes applied on objects by admin, updated or created after the last activity of an user? Can you?
@greetingsgentlemen.8179
@greetingsgentlemen.8179 3 жыл бұрын
no :)
@aayushpatil7514
@aayushpatil7514 4 жыл бұрын
🔥🔥🔥 subscribe already 👍👍
@Pyplane
@Pyplane 4 жыл бұрын
Thank you Aayush! :)
@chipowp
@chipowp 2 жыл бұрын
Good job, but I would HTMX for this kind of stuff instead of pure JS
@chetty1212
@chetty1212 2 жыл бұрын
somehow trying to use this to return a list of replies which is within a list of comments ..
@JacobFeldman
@JacobFeldman 2 жыл бұрын
base.html - can not find it - kzbin.info/www/bejne/qH_IZJVol7xkaLM - (the one in blog is not from here)
@KeepAwayFromAnything
@KeepAwayFromAnything 3 жыл бұрын
Your content should be more visble :)
@Pyplane
@Pyplane 3 жыл бұрын
Thank you!
@brantechsyt6130
@brantechsyt6130 4 жыл бұрын
Hello, bro can we make a collaboration? A KZbin video on a django project.
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 66 МЛН
Django forms with Ajax | How to use ajax with django
34:30
Pyplane
Рет қаралды 40 М.
Vim Tips I Wish I Knew Earlier
23:00
Sebastian Daschner
Рет қаралды 82 М.
OAuth 2.0 and OpenID Connect (in plain English)
1:02:17
OktaDev
Рет қаралды 1,8 МЛН
Django live search | live search using django and javascript
20:07
Django REST Framework - Build an API from Scratch
40:39
Caleb Curry
Рет қаралды 227 М.