I am interested in knowing how other developers implement chained dropdown lists that are dependent on one another. As an example, I have a page/form that has two dropdown lists. When I select a value from the first select, I want the second dropdown to be populated by records related to the first one. This is more of a Country/City situation. Below is how my models look like.
#models.py
class Category(models.Model):
description = models.CharField(max_length=100)
class SubCategory(models.Model):
description = models.CharField(max_length=100)
category = models.ForeignKey(Category)
I am guessing I will have to involve ajax in one way or the other. Anyone has an idea on how to implement this?