Skip to content

Commit

Permalink
Fix remote_ip parameter bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ntucker committed Apr 21, 2012
1 parent cbc1961 commit 3315dda
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion recaptcha_form/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ def __init__(self, *args, **kwargs):


class RecaptchaBaseForm(forms.BaseForm):
def __init__(self, remote_ip, *args, **kwargs):
def __init__(self, *args, **kwargs):
remote_ip = kwargs.pop('remote_ip', None)
for key, field in self.base_fields.items():
if isinstance(field, RecaptchaFieldPlaceholder):
self.base_fields[key] = RecaptchaField(remote_ip, *field.args, **field.kwargs)
Expand Down

0 comments on commit 3315dda

Please sign in to comment.