当前位置: 首页 > python > 正文

DJANGO FORMS:This field is required

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)

本文固定链接: http://2hei.net/django_forms_this_field_is_required.html | 2hei's site

该日志由 2hei 于2010年12月27日发表在 python 分类下,
原创文章转载请注明: DJANGO FORMS:This field is required | 2hei's site
关键字:

报歉!评论已关闭.