This is my admin model SubQuestion
. What I want to do is to build the models or edit the admin so that it will be filtered according to the foreign keys I chose. How should I proceed?
You will have to use JavaScript for this purpose. Best is probably to use a module such as django-autocomplete-light in combination with select2 .
Then you will be able to filter results based on the value of other fields in the form .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.