KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am trying to understand how to use django-autocomplete-light for an existing project. This seems like a good autocomplete solution for django for which I am already using normal ModelChoiceFields. So, let's say that I have a Model named MyModel that has an id and a name. What I'd like to know is the simplest possible way of creating a form widget that would provide me the same functionality with mymodel = forms.ModelChoiceField( required=True, queryset=ships.models.Authority.objects.all() , ) so I'd be able to add that widget to any form I wanted in order to select instances of MyModel without using selec.t What are the required steps to have that ? I've already added 'autocomplete_light' to INSTALLED_APPS and url(r'autocomplete/', include('autocomplete_light.urls')), to urls.py and import autocomplete_light autocomplete_light.autodiscover() before admin.autodiscover() however I am getting confused with what to do next :( Please don't point me in the documentation I've already read it thoroughly.
Tags (comma-separated)
Save Edits
Cancel