A Django wrapper for the Bootstrap Select library
Project description
A Django wrapper for the Bootstrap Select library
Documentation
The full documentation is at https://django-bootstrap-select.readthedocs.io.
Quickstart
Need to render an image in a select box?
Turn this:
Into this:
Install Django Bootstrap Select:
pip install django-bootstrap-select
Add it to your INSTALLED_APPS:
INSTALLED_APPS = (
...
'bootstrap_select.apps.BootstrapSelectConfig',
...
)
Using it in a form:
def get_choices():
choices = (('face.jpg', escape('<img src="path-to-face.jpg"/>'),)
return choices
class IconForm(forms.Form):
icon = forms.URLField(widget=BootstrapSelect(choices=get_choices()))
Features
Renders labels from form choices as custom-content.
Renders tokens from form choices for live-search.
Running Tests
Does the code actually work?
source <YOURVIRTUALENV>/bin/activate (myenv) $ pip install tox (myenv) $ tox
Credits
Tools used in rendering this package:
History
0.1.0 (2017-08-20)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-bootstrap-select-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b10c9089a1c54b20872388d24a66ed3f8b0c011a497b2f0b40f378bae998087 |
|
MD5 | 0f4be54420a8aaaf613b9d9ac3722779 |
|
BLAKE2b-256 | 93a85ceaa9518ced73b264491c7963137608ce1c7cb20a9c282ad85147cef413 |
Close
Hashes for django_bootstrap_select-0.1.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f9fa924ed11f6d58e73e348ee36e0d27d125f9ce56fbb0b6248caf300ae5e9a |
|
MD5 | 131738e9d6c27cd8b43cc6c6c0dab30a |
|
BLAKE2b-256 | 2176ab5fbeb941483a9f672ee24dd611d1c2a1fcb6a38cb9b9572bb73c8b1b92 |