Пример #1
0
 def __init__(self, *args, **kwargs):
     self.request = kwargs.pop('request', None)
     super(RegistrationForm, self).__init__(*args, **kwargs)
     email_required = not askbot_settings.BLANK_EMAIL_ALLOWED
     self.fields['email'] = UserEmailField(required=email_required)
     if askbot_settings.TERMS_CONSENT_REQUIRED:
         self.fields['terms_accepted'] = ConsentField()
     if askbot_settings.USE_RECAPTCHA:
         self.fields['recaptcha'] = AskbotReCaptchaField()
Пример #2
0
 def __init__(self, *args, **kwargs):
     super(SafeClassicRegisterForm, self).__init__(*args, **kwargs)
     self.fields['recaptcha'] = AskbotReCaptchaField()