Chained select Django admin cascade dropdownlist

So many different order nested select boxes. Where for example we have to select Brand of a car then a type of a car.


If you select a brand "BMW" then in subselect only BMW models will appear.


Searched a bit further and this one looks better.


https://github.com/jazzband/django-smart-selects

Many people use this application and very nice stackoverflow post.



https://stackoverflow.com/questions/46464690/django-admin-cascade-dropdownlist

https://github.com/jazzband/django-smart-selects/blob/master/test_app/admin.py

Yes, read code from an admin and model this example.

Looks good.


https://django-smart-selects.readthedocs.io/en/latest/usage.html

This application has been recently updated and works with a recent version of Django.

Only URL pattern is in my opinion a bit strange 
 

re_path(r"^chaining/", include("smart_selects.urls")), 

 
I expected something different and had to search a bit during installation.
Otherwise default installation procedure from document works completely and without problems.

Model looks simple and doesn't need any forms or Admin adjustments everything works like magic.



Comments