Django, Bootstrap Tags input, and Typeahead?

253 views
Skip to first unread message

Mark London

unread,
Oct 13, 2015, 9:57:02 PM10/13/15
to Django users
What is the easiest way to implement a django field with bootstrap and 
typeahead?  I found a module calleddjango-bootstrap-typeahead 
<https://github.com/aj-may/django-bootstrap-typeahead>that looks exactly 
what I want. The instructions say to simply use "TypeaheadField" or 
"MultipleTypeaheadField" in n the django form.   I'm interested in using 
the MultipleTypeheadField feature, so that I can have the classic 
feature of being able to input tags, with typeahead.

I installed this boostrap/typeahead module, and then tried the 
test_project demo. See images. When I enter 2 tags into the 
"MultipleTypeaheadField", and then click submit, the first tag 
disappears, and only the 2nd tag is displayed by the code in views.py:

|messages.success(request,'MultipleTypeahead: %s'  %  form.cleaned_data['multi_typeahead']|

See this page for image of the output from the demo:

http://stackoverflow.com/questions/32739556/best-method-to-implement-twitter-bootstrap-with-typeahead-in-django

Either I don't understand how the module is supposed to work, or the 
demo was not properly designed to show the list of all the inputted tags.

Should I use a different method?   Has anyone used this module?  Thanks. 
- Mark

Reply all
Reply to author
Forward
0 new messages