I have two dropdownlists in a Django admin site. For example, I have SelectCountry and SelectRegion. Region has a foreignkey relationship to Country. How do I ensure that when a Country is selected, the Regions are filtered based on that Country?
N.B: I am using django-grappelli for my admin backend as well.
Any ideas will be appreciated. Thanks.
As DrMeers hints at, use django-smart-selects. No point in re-inventing the wheel.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With