Python username=forms.CharFeild(最大长度=100)AttributeError:module';django.forms';没有属性';查菲尔德';

Python username=forms.CharFeild(最大长度=100)AttributeError:module';django.forms';没有属性';查菲尔德';,python,Python,我得到这个错误: username=forms.CharFeild(最大长度=100)AttributeError:module “django.forms”没有属性“CharFeild” 这是我的密码: from django import forms class RegistrationForm(forms.Form): username=forms.CharFeild(max_length=100) password=forms.CharFeild(max_length

我得到这个错误:

username=forms.CharFeild(最大长度=100)AttributeError:module “django.forms”没有属性“CharFeild”

这是我的密码:

from django import forms

class RegistrationForm(forms.Form):

    username=forms.CharFeild(max_length=100)
    password=forms.CharFeild(max_length=100)
    email=forms.CharFeild(max_length=100)
    phone=forms.CharFeild(max_length=100)

你有一个打字错误:你应该写
CharField
而不是
CharFeild

你有一个打字错误:你应该写
CharField
而不是
CharFeild

,“Feild”拼写为“Field”。“Feild”拼写为“Field”。