Skip to content

Commit a5b526b

Browse files
committed
Updated badges, README etc.
1 parent e475f54 commit a5b526b

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed

README.rst

+18-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
django-searchable-select
22
========================
33

4+
.. Build Status:: https://travis-ci.org/and3rson/django-searchable-select.svg
5+
.. Coverage Status:: https://coveralls.io/repos/github/and3rson/django-searchable-select/badge.svg
6+
47
A better and faster multiple selection widget with suggestions for
58
Django
69

@@ -77,21 +80,22 @@ Installation
7780
.. code:: python
7881
7982
from django import models, forms
80-
from models import MyModel
83+
from searchableselect.widgets import SearchableSelect
84+
from models import Traveler
8185
82-
class MyModelForm(forms.ModelForm):
86+
class TravelerForm(forms.ModelForm):
8387
class Meta:
84-
model = models.MyModel
88+
model = Traveler
8589
exclude = ()
8690
widgets = {
87-
'cities': SearchableSelect(model='cities.City', search_field='name', many=True)
91+
'cities_visited': SearchableSelect(model='cities.City', search_field='name')
8892
}
8993
9094
91-
class MyModelAdmin(admin.ModelAdmin):
92-
form = Form
95+
class TravelerAdmin(admin.ModelAdmin):
96+
form = TravelerForm
9397
94-
admin.site.register(models.MyModel, MyModelAdmin)
98+
admin.site.register(Traveler, TravelerAdmin)
9599
96100
Remember to **always** initialize ``SearchableSelect`` with three
97101
keyword arguments: ``model``, ``search_field`` and ``many``.
@@ -103,10 +107,15 @@ Installation
103107
- ``many`` must be ``True`` for ``ManyToManyField`` and ``False``
104108
for ``ForeignKey``.
105109

110+
Example app
111+
===========
112+
113+
Just run the project from `example` directory, head to http://127.0.0.1:8000, login as ``admin``/``admin`` and try adding Cats!
114+
106115
Known issues
107116
============
108117

109-
- Not tested with empty fields.
118+
- Not tested with empty fields.
110119

111120
Contributing
112121
============
@@ -117,4 +126,4 @@ License
117126
=======
118127

119128
You are free to use this where you want as long as you keep the author
120-
reference. Please see LICENSE for more info.
129+
reference. Please see LICENSE for more info.

setup.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44

55
setup(
66
name='django-searchable-select',
7-
version='1.4.1',
7+
version='1.4.2',
88
description='django-searchable-select - a better and faster multiple selection widget with suggestions for Django',
99
long_description="""django-searchable-select
1010
========================
1111
12+
.. Build Status:: https://travis-ci.org/and3rson/django-searchable-select.svg
13+
.. Coverage Status:: https://coveralls.io/repos/github/and3rson/django-searchable-select/badge.svg
14+
1215
A better and faster multiple selection widget with suggestions for
1316
Django
1417

0 commit comments

Comments
 (0)