存档

2010年12月 的存档

DJANGO FORMS:This field is required

2010年12月27日 评论已被关闭

when meet This field is required at django forms, we can add “required=False” at Fields.

from django import forms

class ContactForm(forms.Form):
    subject = forms.CharField(max_length=100)
    message = forms.CharField()
    sender = forms.EmailField()
    cc_myself = forms.BooleanField(required=False)

分类: python 标签: