₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,330,139 members, 8,444,042 topics. Date: Monday, 13 July 2026 at 12:10 AM

Toggle theme

Django Rest Api - Dropdown Of Countries And States In The World - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingDjango Rest Api - Dropdown Of Countries And States In The World (1794 Views)

1 Reply (Go Down)

Django Rest Api - Dropdown Of Countries And States In The World by akinademayowa(op): 6:59pm On Apr 22, 2021
Hi guys!!!
I just finished a 3-in-1 website project, a dependent/dropdown list of all countries of the world and their respective states/provinces/subdivisions, and all states in Nigeria with the dropdown of their respective local government areas. Then i made the data available to be accessible to others developers using django rest framework.
Do well to check the demo on heroku:
https://countries-states-dropdown-api.herokuapp.com/

The code is available on github..
https://github.com/MayowaFunmi/countries-states-dropdown-api

Let me know your comments and suggestions. Thank you.
Re: Django Rest Api - Dropdown Of Countries And States In The World by bularuz(m): 10:53am On Apr 23, 2021
Not bad though you could improve on the front end design
Re: Django Rest Api - Dropdown Of Countries And States In The World by Xinjin: 9:02pm On Apr 24, 2021
Nice you're working with the powerful Django rest framework

Why did you put the countries/state list in the navigation, it not visible on mobile(why not on the front page)

Why no much styling

What's the core aim of this project? I'd like to contribute to it

Nice project by the way!
Re: Django Rest Api - Dropdown Of Countries And States In The World by Nobody: 12:46pm On Apr 25, 2021
There seems to be a bug.
If you choose a different country and click to get the list of her states, the states of the previously searched country don’t get erased.
The new states just line up at the end of the old list.
Re: Django Rest Api - Dropdown Of Countries And States In The World by akinademayowa(op): 5:54pm On Apr 26, 2021
bularuz:
Not bad though you could improve on the front end design
Yes, I intentionally didn't add any front end design, except the home page alone. If there's need for it I can always do that some other time. Thanks for your contribution
Re: Django Rest Api - Dropdown Of Countries And States In The World by akinademayowa(op): 6:05pm On Apr 26, 2021
Xinjin:
Nice you're working with the powerful Django rest framework

Why did you put the countries/state list in the navigation, it not visible on mobile(why not on the front page)

Why no much styling

What's the core aim of this project? I'd like to contribute to it

Nice project by the way!
Thanks for your contribution sir.
I'll check again if the country state list is indeed not on mobile. But really the last time I checked, it was responsive on both mobile and PC.

I only restricted the styling to the home page alone. It was deliberate. I was working on another project where I needed a drop down list of countries and states...I searched online to get a possible way of creating it, or even use API to get the data, but unfortunately I couldn't get anyone that was helpful. The ones I got, I had to either pay some amount or not even have access. So I decided to create on my and also make the data available via api.
That is the reason for the project. It was just a project to solve a particular problem for me. Later on I could add more features to it.
Re: Django Rest Api - Dropdown Of Countries And States In The World by akinademayowa(op): 6:07pm On Apr 26, 2021
Rgade:
There seems to be a bug.
If you choose a different country and click to get the list of her states, the states of the previously searched country don’t get erased.
The new states just line up at the end of the old list.
Yes, that's correct. I'll find a way around that soon, and you can help with ideas to debug. Meanwhile, try to refresh the page after each search before you search for another country and it'll work fine
Re: Django Rest Api - Dropdown Of Countries And States In The World by benpaul320: 3:31pm On Jan 26, 2022
https://github.com/Benpaul320/nigeria-state-city-api

Hi, you can use this API, you get the states and all cities in that state. the API is awesome that's what i use.
Re: Django Rest Api - Dropdown Of Countries And States In The World by bet9ja(m): 8:29pm On Jan 26, 2022
akinademayowa:
Hi guys!!!
I just finished a 3-in-1 website project, a dependent/dropdown list of all countries of the world and their respective states/provinces/subdivisions, and all states in Nigeria with the dropdown of their respective local government areas. Then i made the data available to be accessible to others developers using django rest framework.
Do well to check the demo on heroku:
https://countries-states-dropdown-api.herokuapp.com/

The code is available on github..
https://github.com/MayowaFunmi/countries-states-dropdown-api

Let me know your comments and suggestions. Thank you.
Spend more time on unit testing. You project is full of bugs.
1 Reply

How To Create Dropdown Menu With Html And CssReact Native Picker Spinner Dropdown Menu List Example - AndroidCreate Dropdown Menu In React Native234

Microcontroller Project: Make An Easy Electronic LED Dice.Can You Solve This?How To Learn Programming A Little Fast