Skip to content

Commit

Permalink
Updated badges, README etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
and3rson committed Oct 30, 2016
1 parent e475f54 commit a5b526b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
27 changes: 18 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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``.
Expand All @@ -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
============
Expand All @@ -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.
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a5b526b

Please sign in to comment.