Create a Dependent Select Field in Django With HTMX

preview_player
Показать описание
In this video I'll show you how to create drop downs that depend on each on other drop downs with Django and HTMX.

Рекомендации по теме
Комментарии
Автор

Perfect and thank you! I have a project which requires me to construct forms on the fly with a ton of dependent dropdowns and other widget types. This has given me a real boost and I appreciate your time.

Love the GitHub repo on your YT vids - wonderful. Cheers from a happy new sub in Sydney, Australia - Dave

deldridg
Автор

Thank you very much! Your video help me with my university project!

omakkin
Автор

Very good idea, could you please share what will be the process to update/edit city and country??

touhedulislam
Автор

The video I have been looking for. Thanks.

ThaddeausIorbeeofficialpage
Автор

Thank you for this video. Its worked but what if in the form there are 3 columns that are related to each other. such as country, city, and district. whether the form of __init__ will remain the same?

kuwsrev
Автор

Very nice tutorial! Would be helpful a follow up with examples where the structure is more complex (e.g. model.ForeignKey with more variables)🙂

JayJay-thhd
Автор

great tutorial, when i save the values it saves the displayed values i want save the value of country 1 for usa and 2 for canada in database.

bdgjkkn
Автор

htmx looks kool. the question is, i guess, there has to be some kind of authorization mechanism or need to implement for fetching from another view. "load_cities" is public endpoint right? anyone can call that url. does htmx provide any access control over http requests?

Автор

I followed your presation. but my select field display cities object (1), cities object (2) . I would like to display the cities name. could you help me please?

tkgfqhr
Автор

Could you please help me with some guidance in using HTMX in FastAPI.

nishantkumar
Автор

Great, thanks for video. Would be nice to see the same functionality in admin site, see what kind of customization it requires.

GevorgVardanyan
Автор

How do we ingest the data which you print out with Country.objects.all() in the database?
The whole example relies on this data and you have not shown how to actually put it there.

KoRNeRd
Автор

Very good idea, could you please share what will be the process to update/edit city and country??

touhedulislam