Answer the question
In order to leave comments, you need to log in
How to display subcategories in the Django admin, depending on the selected category?
Hello, are there any standard django tools for displaying (in the admin) subcategories depending on the selected category. When adding an object, there is a category "region" and "city" (foreign key for the region), when choosing a region, I want to make sure that only the cities of this region are in the city selection.
Answer the question
In order to leave comments, you need to log in
Hello. Back when I was doing django, I think I used this solution . Unfortunately, I don't have time to check right now, but try it - maybe it will help you.
Whether there are standard tools for this now - I can’t say, I haven’t worked with this framework for a couple of years, but at that time - it seems there wasn’t.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question