def __init__(self, public_key=None, private_key=None, *args, **kwargs):
super(ReCaptchaField, self).__init__(*args, **kwargs)<EOL>if not isinstance(self.widget, ReCaptchaBase):<EOL><INDENT>raise ImproperlyConfigured(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>self.required = True<EOL>self.private_key = private_key or getattr(<EOL>settings, "<STR_LIT>", TEST_PRIVATE_KEY)<EOL>self.public_key = public_key or getattr(<EOL>settings, "<STR_LIT>", TEST_PUBLIC_KEY)<EOL>self.widget.attrs["<STR_LIT>"] = self.public_key<EOL>
ReCaptchaField can accepts attributes which is a dictionary of
attributes to be passed to the ReCaptcha widget class. The widget will
loop over any options added and create the RecaptchaOptions
JavaScript variables as specified in
https://developers.google.com/recaptcha/docs/display#render_param