bootstrap select库的django包装器
django-bootstrap-select的Python项目详细描述
引导选择库的django包装器
快速启动
需要在选择框中渲染图像?
转动:
进入这个:
安装django引导程序选择:
pip install django-bootstrap-select
将其添加到已安装的应用程序中
INSTALLED_APPS=(...'bootstrap_select.apps.BootstrapSelectConfig',...)
以某种形式使用:
defget_choices():choices=(('face.jpg',escape('<img src="path-to-face.jpg"/>'),)returnchoicesclassIconForm(forms.Form):icon=forms.URLField(widget=BootstrapSelect(choices=get_choices()))
功能
- 将表单选项中的标签呈现为custom-content。
- 呈现来自live-search的表单选择的标记。
运行测试
代码真的有用吗?
source <YOURVIRTUALENV>/bin/activate (myenv) $ pip install tox (myenv) $ tox
历史记录
0.1.0(2017-08-20)
- pypi上的第一个版本。