2020年5月4日
摘要: {% for item in data %} <li {% if item.class %} class="{{ item.class }}" {% endif %}> <a href="{{ item.url }}" > {{ item.name }} </a> </li> {% endfor % 阅读全文
posted @ 2020-05-04 12:15 仙人小麦 阅读(109) 评论(0) 推荐(0) 编辑
摘要: from django.forms.widgets import RadioSelect class ColorRadioSelect(RadioSelect): # input_type = 'radio' # template_name = 'django/forms/widgets/radio 阅读全文
posted @ 2020-05-04 12:11 仙人小麦 阅读(189) 评论(0) 推荐(0) 编辑
摘要: class BootStrapForm(): bootstrap_exclude = [] def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) for name, field in self.fields.it 阅读全文
posted @ 2020-05-04 12:07 仙人小麦 阅读(155) 评论(0) 推荐(0) 编辑