I would like to integrate Django, and the JavaScript prototype library to create an autocomplete feature for a form. Can anyone recommend a prototype feature that has been tried with Django? There is this code and also this and I’m wondering if anyone would recommend one over the other for use with Django. Thanks!
I would like to integrate Django, and the JavaScript prototype library to create an
Share
I downloaded the code from this site
and followed the directions there, which was straightforward. Just include the prototype.js, scriptaculous.js, and AutoComplete.js files. Then copy paste from the directions, and change the url from
assets/ac.php?m=text&s=to?m=text&s=or even just?s=if one query parameter is all you need.On the server side, in your view function for that page, start the function with:
Then place the rest of the view function under an else clause.