X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/2444d6ffd7995be782615589fb1d5aef2c8277ce..7eca93637b2f696dcc140d36e44d5f4810346e2c:/forum/forms/general.py diff --git a/forum/forms/general.py b/forum/forms/general.py index 4b1133e..e0348a8 100644 --- a/forum/forms/general.py +++ b/forum/forms/general.py @@ -7,6 +7,7 @@ from django.http import str_to_unicode from forum.models import User from forum.modules import call_all_handlers import urllib +import logging DEFAULT_NEXT = getattr(settings, 'APP_BASE_URL') def clean_next(next): @@ -156,7 +157,11 @@ class SetPasswordForm(forms.Form): return self.cleaned_data['password2'] class SimpleCaptchaForm(forms.Form): + fields = {} + def __init__(self, *args, **kwargs): + super(SimpleCaptchaForm, self).__init__(*args, **kwargs) + spam_fields = call_all_handlers('create_anti_spam_field') if spam_fields: spam_fields = dict(spam_fields) @@ -166,4 +171,3 @@ class SimpleCaptchaForm(forms.Form): self._anti_spam_fields = spam_fields.keys() else: self._anti_spam_fields = [] -