【问题标题】:Django materializeDjango物化
【发布时间】:2016-10-05 16:55:22
【问题描述】:

所以我在我的forms.py:

 auto_current_type = forms.ModelMultipleChoiceField(label="Авто:", queryset=Auto_current_type.objects.all(),
                                                       widget=forms.CheckboxSelectMultiple())

我的模板:

<div class="row">

    <form class="col s6 offset-s3 l6 offset-l3 m6 offset-m3" method="post">

        {% form %}

        {% endform %}

     <button class="btn waves-effect waves-light" type="submit" name="action">Поиск
  </button>
    </form>
     </div>

但它看起来是这样的:

如您所见,有车型名称,在下方您可以看到与车型名称相同的复选框。但是复选框不起作用。有什么帮助吗?

【问题讨论】:

    标签: python django forms django-forms materialize


    【解决方案1】:

    我找到了解决办法 here

    我刚刚添加了{{ form|materialize }},它开始工作了

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-01-18
      • 2020-12-21
      • 2018-10-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多