Sir superb, but i want in employee form having coutry from country tbl, blood group, department from dpt tbl, section, designation from desig tbl and etc. Can pls explain. And this not download
Hey brother I'm working on a project where I have a model name Book and inside it I've one field called Author, this author is many to many field so which just like in this video you've language which is getting its field fron language model, it is same in my project. I want to get authors for book upload form from authur model, Now what I want to do is when we have new author then rather than manually crating that author in authur table in admin pannel I want to add it through selecte2 plugin Can you can tell Me how can I do it Now I what I want to do is When I click on
docs.djangoproject.com/en/4.1/topics/db/examples/many_to_many/ The docs has so much info. on this relationship and its almost the same example they are taking.
It should've worked.... even in the case of two fields... You might have got the idea from the video itself on how to do that... Also you can consult Select2 and Django Docs...
Thank you! it worked. But now, I am wondering what I've got to do if I want two select2 fields in the same form. It probably has something to do in the views.py file, right? Along the lines of if #buttonid is clicked, then this term search, if #buttonid2 is clicked then this, right? but ive got no idea
The better way to do that will be using another library called jQuery UI..I have done a video on that too... th-cam.com/video/-oLVZp1NQVE/w-d-xo.html Also, refer this stackoverflow question for more info... stackoverflow.com/questions/20223044/select2-start-with-input-field-instead-of-dropdown
Thanks lot, your video helps lot. I have a form with two fields to be completed with different Foreinkey(email, employee department), could you help me. Please
Thanks :) The process is pretty much the same with even two foreign key fields. You may different options like you can make different ajax requests and url paths for those two foreign key fields OR you can use the same one and differentiate them in the function.
Bro, its pretty much the same concept with little tweaks, if you see the whole video, then probably, you could definitely do the multiple select as well. Thank you.
25:12 -- Fix
Change to :
elif self.instance.pk:
Great video. Spent countless hours trying to find a good autocomplete. This video saved me.....
Glad it helped..keep going👍🏻👍🏻👍🏻
I was trying to solve my problem for 2 days until I found this video. The explaination was just brilliant. Well done and thanks!
Glad it helped!
you made it simple for me great job bro
Thank you so much. I was just customising the ModelForm in admin and it worked just perfectly fine.
Great!
Thanks, great video! Well explained and shown at a good pace!
Glad it was helpful!
Excellent jog. You've just gotten a new subscriber.
Thanks a lot❤️
thanks, it helped me with a problem at work
Welcome😊
Thank you ! this video helps a lot
Glad it helped!
Thank you! Great video!
Glad it helped!😊
Great video, thanks.
Glad you liked it!
Thanks! well explained!
Glad it was helpful! Please share to your circle too... :)
Thank you so much!
Glad to help😊
excelent!!
Thanks 🤗
Good tutorial.
Glad it was helpful! Keep supporting brother... :)
very good
Thanks😊
Great video! Quick question, can we use this in formset?
Thanks, and of course you would be able to integrate it with formset with some tweaks :)
Sir superb, but i want in employee form having coutry from country tbl, blood group, department from dpt tbl, section, designation from desig tbl and etc. Can pls explain. And this not download
HI, it is possible to make query_set filter in non Admin forms, when the user press key in select ?
Yeah, you can make use of onchange event listener to the select element.
Thanku sir
Thanks a lot😊
Hey brother
I'm working on a project where I have a model name Book and inside it I've one field called Author, this author is many to many field so which just like in this video you've language which is getting its field fron language model, it is same in my project.
I want to get authors for book upload form from authur model,
Now what I want to do is when we have new author then rather than manually crating that author in authur table in admin pannel I want to add it through selecte2 plugin
Can you can tell Me how can I do it
Now I what I want to do is When I click on
docs.djangoproject.com/en/4.1/topics/db/examples/many_to_many/
The docs has so much info. on this relationship and its almost the same example they are taking.
How to if we have more than one , I tired is not working please show us or is there any documentation
It should've worked.... even in the case of two fields...
You might have got the idea from the video itself on how to do that... Also you can consult Select2 and Django Docs...
Nice
Thanks 😊
Thank you! it worked. But now, I am wondering what I've got to do if I want two select2 fields in the same form. It probably has something to do in the views.py file, right? Along the lines of if #buttonid is clicked, then this term search, if #buttonid2 is clicked then this, right? but ive got no idea
Sorry for the late reply...
Yeah, you can do that by tweaking views.py and the frontend.
Could u tell me the method to do if i had a search bar instead using only How would i implement the select 2 for this?
The better way to do that will be using another library called jQuery UI..I have done a video on that too...
th-cam.com/video/-oLVZp1NQVE/w-d-xo.html
Also, refer this stackoverflow question for more info...
stackoverflow.com/questions/20223044/select2-start-with-input-field-instead-of-dropdown
Ei, bro. How do I implement with CreateView ? I can't make it to the second part with createview
Sorry for the late reply....
Is this fixed ?
@@CodeBand yes. Thanks
'WSGIRequest' object has no attribute 'is_ajax' this is my error. please answer me..
groups.google.com/g/django-users/c/5x-qF0Q5Xi8?pli=1
How to do it in a many to many relationship, with multipleselect?
next video on tinyMCE PLEASE
Thanks for the suggestion, I will definitely look into that in a future video.
how can we filter data for ManyToManyFields ?
Thanks lot, your video helps lot. I have a form with two fields to be completed with different Foreinkey(email, employee department), could you help me. Please
Thanks :) The process is pretty much the same with even two foreign key fields. You may different options like you can make different ajax requests and url paths for those two foreign key fields OR you can use the same one and differentiate them in the function.
how to add select2 widget in django admin tabular inline form ?
stackoverflow.com/questions/68084590/how-to-use-django-select2-widgets-in-django-admin-site
can you show us how to use select2 with django_filters
Will try to do a video on it, meanwhile try digging into docs and figure it out...
@@CodeBand will do , Thanks
How e-commerce websites do currency converter. When I select USD the price shown in $, when I click INR price shown in rupees. How? How?
There are a lot of API's available out there to do the conversion.
Thanks.. :)
@@CodeBand bro push any tutorials for that. May be it trending topic 🤔
Will think about that...anyway a great idea :)
@@CodeBand I already give u DRF & JwT tutorials, still your not implemented 😟
@@KrishnaManohar8021 Will definitely post them in the near future, Little bit busy now a days, pardon me.
How about multiple select instead? for m2m relationships?
Bro, its pretty much the same concept with little tweaks, if you see the whole video, then probably, you could definitely do the multiple select as well.
Thank you.
Ok i will try
Hi guys, How to use it with Boostrap?
Please go through this link...
stackoverflow.com/questions/36132875/how-to-use-select2-bootstrap
@@CodeBand Thanks bro, keep doing this!
Glad to hear that..😊😊
nonsense...