Skip to main content

A Django wrapper for the Bootstrap Select library

Project description

https://badge.fury.io/py/django-bootstrap-select.svg https://travis-ci.org/voxy/django-bootstrap-select.svg?branch=master https://codecov.io/gh/voxy/django-bootstrap-select/branch/master/graph/badge.svg

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:

docs/img/select_box.png

Into this:

docs/img/bootstrap_select_box.png

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-bootstrap-select, version 0.1.3
Filename, size & hash File type Python version Upload date
django_bootstrap_select-0.1.3-py2.py3-none-any.whl (6.5 kB) View hashes Wheel 2.7
django-bootstrap-select-0.1.3.tar.gz (6.4 kB) View hashes Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page