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.
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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76e6c55544ff09fbb34ad617dce7d16508e5354e117702a0141be04eb07d8bf8 |
|
MD5 | 62cd8f9202a2d63428565dfb6007efbe |
|
BLAKE2b-256 | dc807e350f0c9aff1903c0f6db7e2a5bb48728e897b9e2c9815d18af713e688f |
Close
Hashes for django_bootstrap_select-0.1.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 288d35a5f47bc5afb83843cec55377958723ee344b12af863c4cbbced0cbe607 |
|
MD5 | 9bc4ac2c5ab177824e52ace8630629fa |
|
BLAKE2b-256 | 0499c19a087e38f3ffd811b4692008821844392c0a95689681b6c75617c1c4a6 |