diff --git a/README.rst b/README.rst index 6df15c1..377283c 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,9 @@ django-searchable-select ======================== +.. Build Status:: https://travis-ci.org/and3rson/django-searchable-select.svg +.. Coverage Status:: https://coveralls.io/repos/github/and3rson/django-searchable-select/badge.svg + A better and faster multiple selection widget with suggestions for Django @@ -77,21 +80,22 @@ Installation .. code:: python from django import models, forms - from models import MyModel + from searchableselect.widgets import SearchableSelect + from models import Traveler - class MyModelForm(forms.ModelForm): + class TravelerForm(forms.ModelForm): class Meta: - model = models.MyModel + model = Traveler exclude = () widgets = { - 'cities': SearchableSelect(model='cities.City', search_field='name', many=True) + 'cities_visited': SearchableSelect(model='cities.City', search_field='name') } - class MyModelAdmin(admin.ModelAdmin): - form = Form + class TravelerAdmin(admin.ModelAdmin): + form = TravelerForm - admin.site.register(models.MyModel, MyModelAdmin) + admin.site.register(Traveler, TravelerAdmin) Remember to **always** initialize ``SearchableSelect`` with three keyword arguments: ``model``, ``search_field`` and ``many``. @@ -103,10 +107,15 @@ Installation - ``many`` must be ``True`` for ``ManyToManyField`` and ``False`` for ``ForeignKey``. +Example app +=========== + +Just run the project from `example` directory, head to http://127.0.0.1:8000, login as ``admin``/``admin`` and try adding Cats! + Known issues ============ -- Not tested with empty fields. +- Not tested with empty fields. Contributing ============ @@ -117,4 +126,4 @@ License ======= You are free to use this where you want as long as you keep the author -reference. Please see LICENSE for more info. +reference. Please see LICENSE for more info. \ No newline at end of file diff --git a/setup.py b/setup.py index ea7d5ff..094b537 100644 --- a/setup.py +++ b/setup.py @@ -4,11 +4,14 @@ setup( name='django-searchable-select', - version='1.4.1', + version='1.4.2', description='django-searchable-select - a better and faster multiple selection widget with suggestions for Django', long_description="""django-searchable-select ======================== +.. Build Status:: https://travis-ci.org/and3rson/django-searchable-select.svg +.. Coverage Status:: https://coveralls.io/repos/github/and3rson/django-searchable-select/badge.svg + A better and faster multiple selection widget with suggestions for Django