-
Notifications
You must be signed in to change notification settings - Fork 1
incuna/django-autocomplete
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
=================== Django autocomplete =================== Provides autocomplete widgets. To Use: Add autocomplete to you INSTALLED_APPS. Add the autocomplete.urls to your urls. e.g. urlpatterns += patterns( (r'^autocomplete/', include('autocomplete.urls')), ) Use the autocomplete widgets in your forms from autocomplete.widgets import AutocompleteSelectMultiple class Topping(models.Model): name = forms.CharField(max_length=250, required=True) class PizzaForm(forms.ModelForm): toppings = forms.ModelMultipleChoiceField(Topping, widget=AutocompleteSelectMultiple(Topping, search_fields=['name']), ) To get it working in the templates, you need to include the media, for example: {% block extra_head %} {{ form.media }} {% endblock %}
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Packages 0
No packages published