Django Dependent Drop Down List Example | Integration with Django Forms and Django Form Validations

  Рет қаралды 82,311

Code Band

Code Band

Күн бұрын

Пікірлер: 208
@thetruereality2
@thetruereality2 4 жыл бұрын
You deserve more likes for doing this, Thank you for the effort
@CodeBand
@CodeBand 4 жыл бұрын
Thanks a lot for the support ❤️
@kabakiAntony
@kabakiAntony Жыл бұрын
thanks a lot, I was stumped at how to do this yesterday and today, I did not even watch the video I know it is awesome, and this is the solution I needed. Thank you.
@adminassistancepfe2047
@adminassistancepfe2047 2 жыл бұрын
Thaank you for the video. But i can't understand where did you define the form html syntax. let's suppose weh have already a form set by html, how to edit just dropdownlist ?
@CodeBand
@CodeBand 2 жыл бұрын
Sorry for the late reply... Actually, the html markup is handled by Django Forms module as we have setup ModelForm... If its not a Django Form, then you'll have to deal with populating the data and all, Django Forms just make the process easier.
@derekstout8183
@derekstout8183 4 жыл бұрын
I don't usually comment on videos, but this was very well done. Super thorough and helped me with several roadblocks!
@CodeBand
@CodeBand 4 жыл бұрын
Glad it helped!😊
@user-fq2ty
@user-fq2ty 2 жыл бұрын
But from where do you get the cities an countries, do you declare them in a list somewhere?
@CodeBand
@CodeBand 2 жыл бұрын
Sorry for the late reply.... Pardon me for not mentioning that in the video, actually all the data was added using django admin panel in the starting itself..
@ankitdedhia8460
@ankitdedhia8460 3 жыл бұрын
Mate, you're a legend! Was stuck at this for a week, and now I have you!🔥🔥
@CodeBand
@CodeBand 3 жыл бұрын
Thanks a lot :)
@migy220
@migy220 3 жыл бұрын
Hi! I would like to ask which part in the video showed the inputs of Country names? and City names?
@CodeBand
@CodeBand 3 жыл бұрын
Sorry for the late reply... I have already pushed those sample countries and cities into the DB through the Django admin panel... haven't shown that part in the video....
@migy220
@migy220 3 жыл бұрын
@@CodeBand i see..thank you
@dhananjaysingh194
@dhananjaysingh194 2 жыл бұрын
you're a legend bro! I Was stuck at this for a week
@CodeBand
@CodeBand 2 жыл бұрын
Glad I could help, thanks!
@dhananjaysingh194
@dhananjaysingh194 2 жыл бұрын
@@CodeBand most welcome ❤️
@abhishekojha4047
@abhishekojha4047 Жыл бұрын
For a particular country if only one city is present then it should be automatically selected in the city field and if multiple cities are there then from the dropdown we will select , how to do this ? please reply sir
@5lowToLow
@5lowToLow 3 жыл бұрын
Any idea why this works with func based views but when i changed to class based view it doesnt work
@CodeBand
@CodeBand 3 жыл бұрын
It depends on which CBV you used and how you've done the implementation
@5lowToLow
@5lowToLow 3 жыл бұрын
@@CodeBand nvm, JS for adding formset button was blocking Ajax response whenever i didnt have formset in form applied
@shahrzadgoudarzi572
@shahrzadgoudarzi572 2 жыл бұрын
Undoubtedly, there is the best solution in this training, thank you so much.
@CodeBand
@CodeBand 2 жыл бұрын
Glad to hear that!
@sona257
@sona257 2 жыл бұрын
Hi On 22:58 - The validation message is not showing. I followed the implementation but the form validation is not working. I can submit a form with no country or city. How do I get this validation working please? Great video. 😀
@CodeBand
@CodeBand 2 жыл бұрын
It should show up the validation, can you double check the code with the one in repo.. github.com/akjasim/cb_dj_dependent_dropdown
@rushabhgediya290
@rushabhgediya290 4 жыл бұрын
Hello sir, how to put string in value like India insted of Id and my database, country content have country_id, full name, short name, phone code, when I wil change id to string than State and city not working...
@CodeBand
@CodeBand 4 жыл бұрын
You can change the value in your views.py itself...if you are writing that logic of there...otherwise..you can change that in JavaScript side. Either way its totally possible...and also, you might need to change the logic in views.py while fetching the related/dependant objects.
@douglasmonteiro3085
@douglasmonteiro3085 3 жыл бұрын
It may be a silly question, but how do you populate the cities? and If I want to do a worldwild kinda of depente chain? regards,
@CodeBand
@CodeBand 3 жыл бұрын
You should have the data beforehand. You can search for the country-city related data in Google. There are a lot available...😊
@douglasmonteiro3085
@douglasmonteiro3085 3 жыл бұрын
@@CodeBand yeah I got it, but where should I input that, I have tried many variabled, but just can't figure it out. Sorry about it, just a newby here hehe.
@CodeBand
@CodeBand 3 жыл бұрын
You can input the data manually using Django Admin Panel or you can import the sql file into the corresponding database you're using...
@kevingonzalez-yk6ye
@kevingonzalez-yk6ye 2 жыл бұрын
because I have to send the data twice to accept the value, the first time an invalid option appears and the second time it already admits the value
@CodeBand
@CodeBand 2 жыл бұрын
Sorry for the late reply, can you elaborate a bit more ?
@shofyankhan
@shofyankhan 3 жыл бұрын
hi, your example used for selectbox, what if i want used it for input textbox.. ? ex : search username, and other field like address is filled based on username . do you have example code or reference for that ? thank you
@CodeBand
@CodeBand 3 жыл бұрын
Yes, I do have a separate video on that... kzbin.info/www/bejne/boe8qWCZg6tkorc
@shofyankhan
@shofyankhan 3 жыл бұрын
@@CodeBand thanks.. but still.. i think select2 just for selectbox and not for input field.. and the example on the video only for 1 field (fav language) not 2 field or more..
@CodeBand
@CodeBand 3 жыл бұрын
kzbin.info/www/bejne/Y6Cvh42mZrOEjKc This autocomplete would definitely help you out😊
@mohanmk7102
@mohanmk7102 3 жыл бұрын
from where that city name country name come from is in database or code...
@CodeBand
@CodeBand 3 жыл бұрын
From the DB...
@albinpaulose2375
@albinpaulose2375 2 жыл бұрын
Could please tell how it can do in django default admin panel?
@CodeBand
@CodeBand 2 жыл бұрын
Sorry for the late reply... For Admin panel, you can override the form... stackoverflow.com/questions/10040442/override-a-form-in-django-admin
@muhammadjonmuhamedov5201
@muhammadjonmuhamedov5201 3 жыл бұрын
how we styling this fields. if I use css to this fields it doesn't work. please help me
@CodeBand
@CodeBand 3 жыл бұрын
It should've worked for sure... Please let me know what's going wrong..
@DC-xp9vr
@DC-xp9vr 3 жыл бұрын
dependent dropdown works but it won't post. i don't see any error message on console log but it won't post to database. :(
@CodeBand
@CodeBand 3 жыл бұрын
Cross check the statements in the view... there should be something which makes the prob.
@jakebush8941
@jakebush8941 2 жыл бұрын
if the city has a foreign key to country, why do we need a country field added to person? Shouldn't they all correlate to each other? This seems like we're creating more data than necessary in our tables.
@CodeBand
@CodeBand 2 жыл бұрын
Sorry for the late reply... Yup, country can automatically be inferred from city field, but for the sake of making the form with ModelForm simpler, took this approach. But, yes, it can be accomplished with extra form field and overriding some logic.
@skillsagewithravi
@skillsagewithravi 4 жыл бұрын
If we will use formset factory then we have multiple fields with respective IDs then how we will use this for.....
@CodeBand
@CodeBand 4 жыл бұрын
That's something we have to research😊
@skillsagewithravi
@skillsagewithravi 4 жыл бұрын
@@CodeBand yahh I got it
@CodeBand
@CodeBand 4 жыл бұрын
@@skillsagewithravi Keep going👍🏻
@jaykaravadra5176
@jaykaravadra5176 3 жыл бұрын
It dose't work in admin panle in my case i used dependent dropdownlist in auth model . it works only user side not admin side what can i do?
@CodeBand
@CodeBand 3 жыл бұрын
It would definitely work regardless of user / admin. But for the admin part, you need to do some extra configurations as you need to override the default functionalities😊
@Luqmanx96
@Luqmanx96 3 жыл бұрын
could you explain how you added dummy countries via the admin panel? i am completely lost atm
@CodeBand
@CodeBand 3 жыл бұрын
That's pretty straightforward.... Since we have those models in models.py, we just need to register those in admin.py and then we will be able to see those in Admin Panel...
@fikrimusic2234
@fikrimusic2234 3 жыл бұрын
how to handle manytomany fields? can you give idea?
@CodeBand
@CodeBand 3 жыл бұрын
For many-to-many fields, you might want to make the select field multiple () and then tweak the logic in forms.py
@yasink18
@yasink18 4 жыл бұрын
I have a question would you help me with that.. If I select Country-> INDIA, would I just get form regarding this only..
@CodeBand
@CodeBand 4 жыл бұрын
I'm not that clear with the question. Can you repeat?😊
@yasink18
@yasink18 4 жыл бұрын
@@CodeBand yes.. So if I select India from drop down menu and I want input type text which is related to selected country only and if I select USA so the text type would be different as per the selected drop down list.. I hope it's clear.. 😇😇
@CodeBand
@CodeBand 4 жыл бұрын
As far as I understand the question, you want to render different forms when you select different fields in the dropdown. I think you can do that with Django forms + AJAX, or you can do it with vanilla JS and then handle the form manually in Django.
@boatengevans1834
@boatengevans1834 2 жыл бұрын
Your explanations are soo good
@CodeBand
@CodeBand Жыл бұрын
Thanks a lot 😊
@AtifKhan-ur5kh
@AtifKhan-ur5kh 4 жыл бұрын
iam getting Key error at self.fields['x'].queryset=Models.objects.none() .. the code works well upto 2nd dropdown.. kindly help. iam new to this. thanks in advance
@CodeBand
@CodeBand 4 жыл бұрын
Please check and confirm your code with the code in Github (Link in description)
@CI30
@CI30 2 жыл бұрын
Hi! It's showing an error in Forms.py that ''No module named persons". If u can plz tell its solution.
@CodeBand
@CodeBand 2 жыл бұрын
Sorry for the late reply, this seems like more of an import error. Kindly check whether the import paths are correct.
@marufkhan23508
@marufkhan23508 4 жыл бұрын
Really blessed to get this video. Thanks to this video creator. Well done!
@CodeBand
@CodeBand 4 жыл бұрын
Glad you enjoyed it! 😊😊
@artemunix5223
@artemunix5223 Жыл бұрын
how to change the name of the country when choosing a language, for example en fr it
@mukulkumar-xn2vx
@mukulkumar-xn2vx 3 жыл бұрын
if i want to create country state city than how can i do that
@CodeBand
@CodeBand 3 жыл бұрын
You can definitely do that, the length of the dependent chain doesn't matter, of course, if you've watched this video completely, you definitely have got the logic to do so...
@misfarsiddeek3105
@misfarsiddeek3105 4 жыл бұрын
How to style the model form or django form like your thumbnail??
@CodeBand
@CodeBand 4 жыл бұрын
Styling is pretty much simple....You can catch the id of the field and write some css. Also, if you are using Django forms and want to have some additional attributes in the input field, you can override form class and give them the attributes.... You can get some idea from this video : kzbin.info/www/bejne/hn61kp9_Z7Jmibs
@agriculturalassistant2210
@agriculturalassistant2210 3 жыл бұрын
ജാസിമേ..,....... എന്താ ഈ കാണുന്നെ 💚😍😃👍
@CodeBand
@CodeBand 3 жыл бұрын
Entha cheyya ashikee😊😂
@hikmetpirmamedov5851
@hikmetpirmamedov5851 3 жыл бұрын
Hey hope you are doing well! I have a question: I want to implement the same thing but with car manufacturer and brand (e.x if I select BMW, it gives M series and etc). What I want to ask, should I manually add all brands and manufacturers by myself? Because it will take too long. And + I am doing it on django rest where I don't use forms. How can I implement the same technology but with car brand and manufacture dependent dropdown?
@CodeBand
@CodeBand 3 жыл бұрын
Yes you can! In case you're using DRF, you might wanna mess up with serializers...and btw, you might look into google if there are any data available for car brands and so...otherwise you might wanna add that your own. But most probably, data would be out there...😊
@hikmetpirmamedov5851
@hikmetpirmamedov5851 3 жыл бұрын
@@CodeBand Yeah I found the way to implement it. Now what I want to do is what you shown with forms, but with serializers. And for testing wanna use not the html form, but rest framework's own api browser, if you know what I mean)
@CodeBand
@CodeBand 3 жыл бұрын
@@hikmetpirmamedov5851 Keep going😊
@tramtracynguyen1621
@tramtracynguyen1621 4 жыл бұрын
Thanks for the tutorial. Do you have any tutorial will print out the list if people who registered with same country or city name?
@CodeBand
@CodeBand 4 жыл бұрын
Not yet...but you can do that with simple queries, I believe. Do a quick research on that and I'm sure you'll definitely find how to do it😊
@prusa16
@prusa16 2 жыл бұрын
This video is awsome my friend. I really need like this and this video is perfect for me. Thanks for effort.
@CodeBand
@CodeBand 2 жыл бұрын
Glad it was helpful, thanks so much!
@takbahadurshrestha1489
@takbahadurshrestha1489 4 жыл бұрын
Thank you Sir, very much. From dependent drop down list 'city' how to make multiple choosing option? I used "widgets = {'inclusive': forms.CheckboxSelectMultiple(attrs={'class': 'list-unstyled list-unline'}),}" but it does not work, please me.
@CodeBand
@CodeBand 4 жыл бұрын
Try with SelectMultiple, docs here : docs.djangoproject.com/en/3.1/ref/forms/widgets/#selectmultiple
@trevormadden4301
@trevormadden4301 Жыл бұрын
Thanks a lot Man. Graet work. I learned a lot . Keep up the good work
@CodeBand
@CodeBand Жыл бұрын
Glad to hear that!
@souleymanekeita6077
@souleymanekeita6077 2 жыл бұрын
please how can i watch with better quality my pc is not performent
@CodeBand
@CodeBand 2 жыл бұрын
Sorry for the late reply... Try downloading the video and play it on local.
@cracknynemc8238
@cracknynemc8238 3 жыл бұрын
Hi, I implemented your example in my project and it worked very well. But now I have a problem, I want to make another dependent list with respect to the city, for example, we already know we have the state and the city, but now I must add a locality. Try to experiment, but it just doesn't show me anything. But the truth is that the video is excellent, thank you very much for that help.
@CodeBand
@CodeBand 3 жыл бұрын
Thanks a lot... And as far as locality, you can pretty much try the similar logic :)
@trevormadden4301
@trevormadden4301 Жыл бұрын
Thanks again man. Just wondering how I could have a few of these on my post page. It would work perfectly for a site I'm trying to build. I've tried to just double up on everything in the code but mo luck.
@kabakiAntony
@kabakiAntony Жыл бұрын
hey, drop me a message if you still need help with this I would be happy to help.
@ЭрикАракельян
@ЭрикАракельян 4 жыл бұрын
Nice. But how to do the same thing if i have two forms on one page and each form is depended to each other?
@CodeBand
@CodeBand 4 жыл бұрын
Cool. Thats a good question and possibly a point to research.
@ganeshsuresh4723
@ganeshsuresh4723 3 жыл бұрын
This is awesome. Kindly create the same video for multi select where I have to select both countries with selected states ....I have used the same logic. But form is invalid ... Kindly help me
@CodeBand
@CodeBand 3 жыл бұрын
Sorry for the late response. Thanks and regarding multi-select, it should be fairly straight forward along with the current setup.
@ignaciobarria5043
@ignaciobarria5043 4 жыл бұрын
I implemented it in my project and it works perfectly to create, but when I want to edit it throws an error
@CodeBand
@CodeBand 4 жыл бұрын
It should work...as I have explained both create and update correctly in the videos... Compare your code with the repository : github.com/akjasim/cb_dj_dependent_dropdown/
@kimjay6806
@kimjay6806 2 жыл бұрын
You're simply amazing dude! Keep up the good work! just subscribed :)
@CodeBand
@CodeBand 2 жыл бұрын
Thanks for the sub!
@rangabharath4253
@rangabharath4253 4 жыл бұрын
awesome as always
@CodeBand
@CodeBand 4 жыл бұрын
Thank you and keep supporting :)
@atikulislam2805
@atikulislam2805 4 жыл бұрын
Hi, I want to implement three dependent dropdowns. For example, the Second dropdown is dependent on the first dropdown and the third one is dependent on the second one. Like the country, state, and city. The state is dependent on the country and the city is dependent on state selection. How can I do so? If possible can give me the GitHub link after implementing it. Advanced thanks.
@CodeBand
@CodeBand 4 жыл бұрын
It's totally possible, if you have watched this video, then by now, you should be able to implement that on your own, because, In this video, I have explained everything in detail about dependent dropdowns, so, it would not be much hard to implement three dep-dropdown👍🏻👍🏻
@ayubkara1092
@ayubkara1092 2 жыл бұрын
i like your teaching style , it would be perfect if you add htmx method
@CodeBand
@CodeBand 2 жыл бұрын
Thank you and great suggestion! Will try to do that.
@packetshark
@packetshark 3 жыл бұрын
Watch it at 0.75 playback speed if you think the speed is a bit fast to understand.
@zhamza
@zhamza 2 жыл бұрын
Thank you for the great tutorial and the step by step
@CodeBand
@CodeBand 2 жыл бұрын
You are welcome!
@rajyadav5484
@rajyadav5484 3 жыл бұрын
thankyou for the detailed explaination
@CodeBand
@CodeBand 3 жыл бұрын
Glad to help you...
@patrickknows2296
@patrickknows2296 4 жыл бұрын
Great. Bro can you add an export to csv to the filtered data? There's lots of tutorial out there but the export to csv their teaching exports all the data. What I am looking for is when you filtered the form, then that data is what I want to export to csv. Please use filter forms. Because I used it and not the forms or maybe both brother please
@CodeBand
@CodeBand 4 жыл бұрын
Thanks for the idea and I will look into that brother in the future.😊
@afsarriyan7395
@afsarriyan7395 3 жыл бұрын
Thank you for making this amazing video. Could you please guide how to use this plus dynamic add/remove form and generate JSON ? something like dependent dropdown+dynamic add/remove fields and when user submits it just generate JSON object .
@CodeBand
@CodeBand 3 жыл бұрын
Sorry for the late reply... For dynamic add/remove form, you can make use of Django formsets... docs.djangoproject.com/en/3.2/topics/forms/formsets/
@jnscollier
@jnscollier 4 жыл бұрын
making html_data as a string, then looping through each object item sent from the JsonResponse as a list seems clunky / hacky. Sure it works but it's not very clean IMO. BUT, I don't know of a cleaner way. Anyone know if there is a cleaner way?
@CodeBand
@CodeBand 4 жыл бұрын
You can pretty much serialize the data using serializers provided by Django itself(data contains some unwanted stuff...) or using some third party libs like DRF and then sent the data to the client.😊
@penikmatyoutube6380
@penikmatyoutube6380 3 жыл бұрын
how can i see the admin.py?
@CodeBand
@CodeBand 3 жыл бұрын
There is nothing there in admin.py, I haven't configured anything related to Admin Panel. Just entered the country & city in the panel, that's it...
@Andandonafronteira
@Andandonafronteira 4 жыл бұрын
thanks a lot, you have helped me a lot with some projects, keep up the good work !!!
@CodeBand
@CodeBand 4 жыл бұрын
Glad to hear that! keep going❤️
@lotfi43dz
@lotfi43dz 4 жыл бұрын
Just awesome , Thank you man
@CodeBand
@CodeBand 4 жыл бұрын
Thanks a lot man...keep going👍🏻
@raulpinedagasch3505
@raulpinedagasch3505 3 ай бұрын
Great video
@alimannarkkadaliparambil1761
@alimannarkkadaliparambil1761 4 жыл бұрын
Awsome 👌❤️
@CodeBand
@CodeBand 4 жыл бұрын
Thank yew :)
@olusegunodewole4356
@olusegunodewole4356 4 жыл бұрын
Excellent!
@CodeBand
@CodeBand 4 жыл бұрын
Many thanks!
@freizagen
@freizagen 3 жыл бұрын
Thank You very much.
@CodeBand
@CodeBand 3 жыл бұрын
You are welcome!
@demusoli
@demusoli 2 жыл бұрын
Thank you! Great explanation
@CodeBand
@CodeBand 2 жыл бұрын
Glad it was helpful!
@BrendanMetcalfe
@BrendanMetcalfe 4 жыл бұрын
So basically you did it in AJAZ with Javascript
@CodeBand
@CodeBand 4 жыл бұрын
AJAX is one way to go in those cases😊
@BrendanMetcalfe
@BrendanMetcalfe 4 жыл бұрын
@@CodeBand It almost doesn't matter that it's a Django site then... its all front end work. All good! Great vid!
@CodeBand
@CodeBand 4 жыл бұрын
@@BrendanMetcalfe Glad to hear that❤️
@sleepingknight3832
@sleepingknight3832 2 жыл бұрын
you are a life saver
@CodeBand
@CodeBand 2 жыл бұрын
Thanks a lot...
@purplejelly24
@purplejelly24 3 жыл бұрын
Thank you very much for this! :)
@CodeBand
@CodeBand 3 жыл бұрын
Very glad to hear that😊
@misfarsiddeek3105
@misfarsiddeek3105 4 жыл бұрын
Bro. Awesome. But, Please use dark themes
@CodeBand
@CodeBand 4 жыл бұрын
Thanks a lot..and about using dark themes, it will not be that visible, I mean, in lower resolutions, it will not be clear. Thanks for the suggestion.😊
@misfarsiddeek3105
@misfarsiddeek3105 4 жыл бұрын
@@CodeBand ohh is it? Then ok bro. Coz, light theme is not comfortable for me. That's what I said it... Hehe it's Ok. You are doing good job. Keep going. We are looking forward your videos. Please if can make a video to connecting django form or model forms with interactive design. I mean using bootstrap. Bcz when we do {{form.as_p}} it's not giving interactive design. So, I need this django forms or Model forms with interactive bootstrap design. Please, make like that video. Or if u have already made one, please share me the link. Thank u. 💕❤️☺️
@CodeBand
@CodeBand 4 жыл бұрын
I have done a video on Django forms manual rendering...check it out... kzbin.info/www/bejne/hn61kp9_Z7Jmibs Also, you can have bootstrap based styled django forms with Django Crispy Forms package...Read more on simpleisbetterthancomplex.com/tutorial/2018/11/28/advanced-form-rendering-with-django-crispy-forms.html
@misfarsiddeek3105
@misfarsiddeek3105 4 жыл бұрын
@@CodeBand❤️❤️💕 thank you
@CodeBand
@CodeBand 4 жыл бұрын
@@misfarsiddeek3105 Keep going👍🏻
@vinrayudu
@vinrayudu 3 жыл бұрын
This is fantastic, helped me a lot, thanks for the tutorial :)
@CodeBand
@CodeBand 3 жыл бұрын
Glad to hear that! Keep watching😊
@vinrayudu
@vinrayudu 3 жыл бұрын
@@CodeBand When nothing is selected in Country drop down I still see all the cities, how do I not see Cities when no Country is selected?
@CodeBand
@CodeBand 3 жыл бұрын
@@vinrayudu I think there's an issue with your code... In my case, there's nothing showing in the city field, even when no country is selected.
4 жыл бұрын
good video mate. thank you very much. dark themes much better for screencasting.
@CodeBand
@CodeBand 4 жыл бұрын
Glad it helped😊 and thanks for the suggestion👍🏻
@obaydulnayeem
@obaydulnayeem Жыл бұрын
Thanks a million!
@genuinepshyco4050
@genuinepshyco4050 4 жыл бұрын
Plz help sir , i want to do the same thing on admin....waiting for your reply
@CodeBand
@CodeBand 4 жыл бұрын
On the Django Administration Panel, you can do that by overriding a set of forms and definitions on the ModelAdmin class. Here is a bit of info. on the topic : stackoverflow.com/questions/10040442/override-a-form-in-django-admin#:~:text=You%20can%20override%20forms%20for,contrib.admin.ModelAdmin.form
@merabetmohamed
@merabetmohamed 4 жыл бұрын
thank you bro awesome
@CodeBand
@CodeBand 4 жыл бұрын
Thanks and welcome😊😊
@md.emdadulhaque5245
@md.emdadulhaque5245 4 жыл бұрын
Thanks bro. Really you made very essentials tutorial. I would be glad if you make a tutorial for multiple dependence like Country, state and city and also i request you to include a filed date picker for Date of Birth field
@CodeBand
@CodeBand 4 жыл бұрын
Great suggestion! As a sidenote, multiple dependency chains can be implemented in the same way that I did in this video with a slight logic change, you may give it a shot. And I have noted your Date of Birth suggestion. Thanks and keep supporting ❤️
@ABMA79
@ABMA79 3 жыл бұрын
If you would start from scratch in a long video, it will be more beneficial for your viewers. I think the current explanation can be confusing to a large extent brother.
@CodeBand
@CodeBand 3 жыл бұрын
Starting from absolute scratch might make the video very lengthy, but I have explained everything related to dropdown in detail. And the end users, would probably be persons who know the basics of Django.😊
@ABMA79
@ABMA79 3 жыл бұрын
@@CodeBand I am trying to learn the usage of ajax with django. as for the basic, I think i have formed some kind of acceptable knowledge and I have already designed some websites through django. I am searching for a video that helps me understand the utilization of ajax with django forms. That is all.
@CodeBand
@CodeBand 3 жыл бұрын
@@ABMA79 Oh I see, keep going👍🏻
@bc.export5542
@bc.export5542 3 жыл бұрын
Great! Thx!
@CodeBand
@CodeBand 3 жыл бұрын
Welcome!
@mfsdrawings8600
@mfsdrawings8600 4 жыл бұрын
Nice 👍🏻
@CodeBand
@CodeBand 4 жыл бұрын
Thanks ✌️
@girishmahamuni1830
@girishmahamuni1830 3 жыл бұрын
Thank you brother
@CodeBand
@CodeBand 3 жыл бұрын
Glad to hear that😊
@sudanbhandari7777
@sudanbhandari7777 4 жыл бұрын
thank you :) how to implement three Dependent dropdown ?
@CodeBand
@CodeBand 4 жыл бұрын
Thanks a lot😊 Three Dependant Dropdown is also very simple, if you fully understood this video...you might have to add some extra logic for that extra field...and thats it...😊
@sudanbhandari7777
@sudanbhandari7777 4 жыл бұрын
@@CodeBand thanks bro i did it
@CodeBand
@CodeBand 4 жыл бұрын
Keep going👍🏻👍🏻
@ruzzan
@ruzzan 3 жыл бұрын
Bruh this is from the blog of simpleisbettetthancomplex
@CodeBand
@CodeBand 3 жыл бұрын
Not exactly, but the idea was inspired from sibtc😍
@nicolaslupi3111
@nicolaslupi3111 3 жыл бұрын
Life saver
@CodeBand
@CodeBand 3 жыл бұрын
Very glad to hear that..Thanks for watching😊
@adwaith_5052
@adwaith_5052 Жыл бұрын
aliyan malayali ano?
@ABMA79
@ABMA79 3 жыл бұрын
Even though the explanation takes a long time for a viewer to understand because of the speed, but I would really appreciate a more detailed video on the requirements that must be available for this feature to work. But overall, great effort brother. Thanks for the time and knowledge, it is beneficial in all cases. Best regards.
@CodeBand
@CodeBand 3 жыл бұрын
Glad to hear that...Thanks a lot and keep supporting😊😊
@jaradc2198
@jaradc2198 2 жыл бұрын
Yeah, in fact, he should just code your project for you. And while he's at it, maybe he could do your laundry and take out your trash.
@ABMA79
@ABMA79 2 жыл бұрын
@@jaradc2198 What did I say wrong that tipped you off like that? If you can, highlight what you think was disrespectful; otherwise, I highly suggest you mind your business and never mouth off none-sense
@jayshah651
@jayshah651 Жыл бұрын
Thank yoy
@CodeBand
@CodeBand Жыл бұрын
Welcome 😊
@azocarsimon
@azocarsimon 3 жыл бұрын
thanks!
@CodeBand
@CodeBand 3 жыл бұрын
Welcome!
@ivonne8412
@ivonne8412 3 жыл бұрын
This is a copy of Vitor Freitas work
@CodeBand
@CodeBand 3 жыл бұрын
I did the research based on Vitor's blog...
@maekee
@maekee 3 жыл бұрын
Thanks alot, but i get stressed when listening to you talk. Calm down dude :)
@CodeBand
@CodeBand 3 жыл бұрын
Sorry about that, will try to get better in future videos😊
@hakimdz3358
@hakimdz3358 3 жыл бұрын
Good code, but the explanation is very, very bad
@CodeBand
@CodeBand 3 жыл бұрын
Sorry to hear that... I always try hard to make the videos clear and concise.... Anyways, if you feel like so, I would definitely try to improve in the next videos...😊
@sunu-tech
@sunu-tech 3 жыл бұрын
@@CodeBand PLZ i get this Select a valid choice. This choice is not one of those available.
@Ayyaa-j7u
@Ayyaa-j7u 3 жыл бұрын
gak bahasa inggris
@CodeBand
@CodeBand 3 жыл бұрын
ya itu
@speaknoworforeverholdyourp1317
@speaknoworforeverholdyourp1317 3 жыл бұрын
Explanation gets lost because you are all over the place. Need to improve on communication skill.
@CodeBand
@CodeBand 3 жыл бұрын
Very sorry to hear that...will try to improve communication😊
@abirulezz
@abirulezz 4 жыл бұрын
How can we do the same using Django rest framework serializers?
@CodeBand
@CodeBand 4 жыл бұрын
1) Make an endpoint 2) Create a ModelSerializer with field country(write-only field). 3) Make a field city using SerializerMethodField(). 4) Implement get_city() method where you can filter the queryset based upon the object you receive. This is one way of handling this. There are a lot other approaches too... Hope this helps..😊
@abirulezz
@abirulezz 4 жыл бұрын
As per your solution, the get_city() will filter everytime there is a get request, if my understanding is correct. Don't you think we have to filter Everytime the drop-down changes(real time dynamic filtering)?
@CodeBand
@CodeBand 4 жыл бұрын
As soon as the user selects a different value in the first dropdown, we need to select the dependant values...thats what it is...right?
@shakthis8126
@shakthis8126 2 жыл бұрын
Thanks a lot ✨
@CodeBand
@CodeBand 2 жыл бұрын
Glad to hear that...
SLIDE #shortssprintbrasil
0:31
Natan por Aí
Рет қаралды 49 МЛН
UFC 287 : Перейра VS Адесанья 2
6:02
Setanta Sports UFC
Рет қаралды 486 М.
БАБУШКА ШАРИТ #shorts
0:16
Паша Осадчий
Рет қаралды 4,1 МЛН
УНО Реверс в Амонг Ас : игра на выбывание
0:19
Фани Хани
Рет қаралды 1,3 МЛН
Create Dependent Drop Down List in Excel - EASY METHOD
12:10
Kevin Stratvert
Рет қаралды 184 М.
Django and HTMX #10 - Chained Dropdowns with Django and HTMX
12:27
How To Add Database Forms To A Web Page - Django Wednesdays #7
28:24
Create a Dependent Select Field in Django With HTMX
14:37
Pretty Printed
Рет қаралды 19 М.
Django 5.0 Just Made Forms Even Better
3:24
Dennis Ivy
Рет қаралды 19 М.
This is the Only Right Way to Write React clean-code - SOLID
18:23
SLIDE #shortssprintbrasil
0:31
Natan por Aí
Рет қаралды 49 МЛН