Django Sort Dropdown

Recently while working on PrinceJets I found I really needed to filter a drop down on a ForeignKey relationship. I found a way to do it in the Django documentation but it said not to use it for queries that returned over 100 results but my model was regions which were linked to countries and then continents. In short I had thousands of records to sort through.

Uggh, it should be simple, but it wasn’t. Luckily, after a bunch of searching I stumbled on Django smart selects which had my list sorted in a matter of minutes. Hail to open source!

comments powered by Disqus