django autocomplete light

111 views
Skip to first unread message

Ahmet Muazim Tunç

unread,
Sep 16, 2017, 7:24:48 AM9/16/17
to Django users
I want to make two or three dropdown menus which are dependent on each other. It's Country, City dropdown menus and when Country is selected City dropdown menu has to be filled with proper cities. How can I make this?
I have the data, installed the django-cities-light app and filled my db with the current country, city information

Ryan Nowakowski

unread,
Sep 16, 2017, 3:36:04 PM9/16/17
to Ahmet Muazim Tunç, Django users
If all dropdowns are on the same page, you probably need to create some views that return json, then hit those views with ajax.

Roman Akopov

unread,
Sep 17, 2017, 8:13:08 AM9/17/17
to Django users

Gerald Brown

unread,
Mar 31, 2018, 10:12:11 AM3/31/18
to Django users
Have a look at this article: https://simpleisbetterthancomplex.com/tutorial/2018/01/29/how-to-implement-dependent-or-chained-dropdown-list-with-django.html It might do what you are trying to do.  There are also a lot of other posts about Django on this site.
Reply all
Reply to author
Forward
0 new messages