django-bootstrap3如何修复表单字段和提交按钮之间的大差距?

时间:2014-04-03 23:28:01

标签: django django-forms django-templates twitter-bootstrap-3

以下是form看起来的样子:

enter image description here

尽管formGo按钮距离太远,但我希望它位于dropdown menu旁边。这是我使用django-bootstrap3

的模板代码
    {% extends "base.html" %}
{% load bootstrap3 %}
{% bootstrap_css %}
{% bootstrap_javascript %}
{% block content %}
    <div class="col-sm-offset-5 col-sm-10">
    <form action="" method="post" role="form" class='form-inline col-sm-8'>
        {% csrf_token %}
        <div class="form-group">
        </label class="sr-only" for="choices">Select to Edit</label>
        </div>
        {% bootstrap_field form.choices show_label=False %}
          <button type="submit" class="btn btn-primary">
            {% bootstrap_icon "star" %} Go
          </button>
     </div>
    </form>
{% endblock %}

0 个答案:

没有答案