Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/362.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将Python/WTForms/Bootstrap生成的标签和单选按钮保持在同一行_Python_Twitter Bootstrap 3_Wtforms_Radiobuttonlist - Fatal编程技术网

将Python/WTForms/Bootstrap生成的标签和单选按钮保持在同一行

将Python/WTForms/Bootstrap生成的标签和单选按钮保持在同一行,python,twitter-bootstrap-3,wtforms,radiobuttonlist,Python,Twitter Bootstrap 3,Wtforms,Radiobuttonlist,我正在使用Python/Flask WTForms 2.1版和Boostrap 3 CSS,我找不到解决此问题的方法: 在Python表单生成代码中,我有这个表单元素 searchtype = RadioField("Search type:", choices=[('any', 'Any names'), ('all', 'All names')]) 在我的烧瓶模板里 <!-- radiobutton for search type --> {{form.searchtype.

我正在使用Python/Flask WTForms 2.1版和Boostrap 3 CSS,我找不到解决此问题的方法:

在Python表单生成代码中,我有这个表单元素

searchtype = RadioField("Search type:", choices=[('any', 'Any names'), ('all', 'All names')])
在我的烧瓶模板里

<!-- radiobutton for search type -->
 {{form.searchtype.label}}{{form.searchtype(class_="list-inline")}}

{{form.searchtype.label}{{form.searchtype(class=“list inline”)}
单选按钮是通过“list inline”内联正确生成的,但是在标签元素之后有一个换行符,我想删除它。但是,我找不到任何类或样式可以添加到form.searchtype.label或form.searchtype,这将使单选按钮在元素后的同一行上运行

生成的HTML:

<label for="searchtype">Search type:</label>
<ul class="list-inline" id="searchtype">
<li><input id="searchtype-0" name="searchtype" type="radio" value="any">
<label for="searchtype-0">Any names</label></li>
<li><input id="searchtype-1" name="searchtype" type="radio" value="all"> 
<label for="searchtype-1">All names</label></li></ul>
搜索类型:
  • 有名字吗
  • 所有名称
提前谢谢