I have been trying to create a 3 column drop-down list as Country, State, City.
The list of state will be shown based on which country is selected. and the same thing happens to city depends on which State is selected.
My database is as follow. If a country is selected, then states will show depending on country. Same thing happens to City
A member will select his country,state, and city from an already existed Country, State, City databases
from django.db import models
class Member(models.Model):
residing_country = models.CharField(max_length=50)
residing_state = models.CharField(max_length=50)
residing_city = models.CharField(max_length=50)
class Country(models.Model):
country= models.CharField(max_length=20)
class State(models.Model):
state=models.CharField(max_length=20)
country = models.ForeignKey(Country)
class City(models.Model):
city=models.CharField(max_length=20)
state=models.ForeignKey(State)