开发者

Django registration and math captcha not playing nice with each other

I'm trying to integrate django-registration with django-math-captcha, but I'm running into troubles. I followed the examples math captcha's github. If I subclass registration.forms.RegistrationForm with MathCaptchaModelForm or MathCaptchaForm I get different errors

My code and respective errors

class RegistrationForm(forms.Form, MathCaptchaModelForm) 
Error: Error when calling the metaclass bases metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
or
class RegistrationForm(forms.Form, MathCaptchaForm)

Error:Error when calling the metaclass bases.    Cannot create a

consistent开发者_开发问答 method resolution order (MRO) for bases Form, MathCaptchaForm

Thanks for your help!


Just extend MatchCaptchaModelForm as it already extends forms.ModelForm.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜