为了账号安全,请及时绑定邮箱和手机立即绑定

python django choice怎么输出

python django choice怎么输出

慕田峪9158850 2018-10-10 13:35:55
查看完整描述

2 回答

?
手掌心

TA贡献1942条经验 获得超3个赞

class ContactForm(forms.Form):
     reason = forms.ChoiceField(choices=[("feature", "A feature"),
                                         ("order", "An order")],
                                widget=forms.RadioSelect)

通过widget输出

查看完整回答
反对 回复 2018-10-24
  • 2 回答
  • 0 关注
  • 946 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信