I'开发者_开发技巧m trying to implement user profile module to my django project, but I'm getting this error:
Form 'SignupForm' could be validated, while 'ProfileForm' couldn't. Please make sure the two classes are compatible. Validation errors were: * user
* Обязательное поле.(can't be blank)
My code:
http://pastie.org/2586199
Can anyone help me? Thanks in advance.
You should probably just set the Model meta attribute to your profile class manually instead of grabbing it from the settings:
from some.module import MyProfile
class ProfileForm(forms.ModelForm):
pass
class Meta:
model = MyProfile
That code seems to be vastly over complicating a fairly simple operation
精彩评论