I still haven't solved this problem entirely, and I'll tell you why. The issue has been discussed by many people, but probably the first and most influential solution is still Jannis Leidel's 'An autocomplete form widget for ForeignKey model fields'.
[..] my question is, if this could be done on a more abstract level for enhancing relations. when having a foreignkey, you get the browse-icon (lens) right near the input-field. it´d be awesome to search the relations just by typing something into the field … the autocomplete-functionality should then search the related entries on the basis of the defined search-fields.
Here's a nice screencast of the the result [UPDATE: unfortunately the screencast is not available anymore - instead an unsettling image of mad nazi soldiers]:
Leidel's solution is not a copy-paste type of thing, but it's very useful to study his code so to understand what's going on there, and then replicate it in your specific user-scenario. That's exactly what several people have done.
Nonetheless, reusing is more agile that doing things from scratch, isn't it? So, after a bit of research I reached the conclusion that the most interesting and reusable (meaning, plug-and-play) django implementations of jquery's autocomplete are the following two.
After having a go with both of them I decided to use the first one [the admin extensions section of the django-extensions project], cause I don't need many2many support and I really liked the fact that the standard 'raw-id' behaviour is still available.
Here's a nice screencast (by the way I just realized that this one has been made by Jannis Leidel too, so I guess it's sort of an evolution of the previous one) [UPDATE #2: also this screencast is not available anymore! what's going on with mr Leidel?]:
Conclusion: there's only one BIG problem - it doesn't work with inlines out-of-the-box ! I'm looking at extending it now... will keep you posted!
Cite this blog post:
Second biennial conference on Language, Data and Knowledge (LDK 2019), Leipzig, Germany, May 2019.
WHiSe 2017 - 2nd Workshop on Humanities in the Semantic web (colocated with ISWC17), Vienna, Austria, Oct 2017.
Fourth International Conference on Knowledge Capture (K-CAP07), Whistler, BC, Canada, Oct 2007. pp. 47-54