rabbid
rabbid

Reputation: 5725

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!

Upvotes: 0

Views: 251

Answers (1)

Brandon Taylor
Brandon Taylor

Reputation: 34583

Just extend MatchCaptchaModelForm as it already extends forms.ModelForm.

Upvotes: 1

Related Questions