how to add
tag instead of
  • 前端 未结 4 1832
    [愿得一人]
    [愿得一人] 2020-12-18 05:35

    forms.py

    class TypeSelectionForm(forms.Form):
        checkbox_field = forms.MultipleChoiceField(widget=forms.CheckboxSelectMultiple(), label=\"\", required=Fals         
    
    
            
    4条回答
    •  轻奢々
      轻奢々 (楼主)
      2020-12-18 06:14

      This is similar to @bhappy 's solution. The overall solution is to define a custom as_div method and use it as a template filter in your templates. Have a look at this django snippets post: Custom Form Example: Forms for Bootstrap Html - CSS Toolkit

    提交回复
    热议问题