Exemplo n.º 1
0
 def get(self):
     chtml = captcha.displayhtml(
         public_key = self.reCaptcha_public_key,
         use_ssl = False,
         error = None)
     params = {'captchahtml': chtml}
     return self.render_template('user/password_reset.html', **params)
Exemplo n.º 2
0
 def get(self):
     chtml = captcha.displayhtml(public_key=self.reCaptcha_public_key,
                                 use_ssl=False,
                                 error=None)
     params = {
         'captchahtml': chtml,
     }
     return self.render_template('boilerplate_password_reset.html',
                                 **params)
Exemplo n.º 3
0
 def get(self):
     chtml = captcha.displayhtml(
         public_key = self.reCaptcha_public_key,
         use_ssl = False,
         error = None)
     params = {
         'action': self.request.url,
         'captchahtml': chtml,
         }
     return self.render_template('boilerplate_password_reset.html', **params)
Exemplo n.º 4
0
def captchaBase(self):
    if self.app.config.get('captcha_public_key') == "" or \
                    self.app.config.get('captcha_private_key') == "":
        chtml = '<div class="alert alert-danger"><strong>Error</strong>: You have to ' \
                '<a href="http://www.google.com/recaptcha/" target="_blank">sign up ' \
                'for API keys</a> in order to use reCAPTCHA.</div>' \
                '<input type="hidden" name="recaptcha_challenge_field" value="manual_challenge" />' \
                '<input type="hidden" name="recaptcha_response_field" value="manual_challenge" />'
    else:
        chtml = captcha.displayhtml(public_key=self.app.config.get('captcha_public_key'))
    return chtml
Exemplo n.º 5
0
    def get(self):
        if self.user:
            self.redirect_to('secure')

        chtml = captcha.displayhtml(public_key=self.reCaptcha_public_key,
                                    use_ssl=False,
                                    error=None)
        params = {
            'action': self.request.url,
            'captchahtml': chtml,
        }
        return self.render_template('boilerplate_password_reset.html',
                                    **params)
Exemplo n.º 6
0
	def get(self):
		chtml = captcha.displayhtml(
			public_key = self.app.config.get('captcha_public_key'),
			use_ssl = False,
			error = None)
		if self.app.config.get('captcha_public_key') == "PUT_YOUR_RECAPCHA_PUBLIC_KEY_HERE" or \
		   self.app.config.get('captcha_private_key') == "PUT_YOUR_RECAPCHA_PUBLIC_KEY_HERE":
			chtml = '<div class="alert alert-error"><strong>Error</strong>: You have to ' \
					'<a href="http://www.google.com/recaptcha/whyrecaptcha" target="_blank">sign up ' \
					'for API keys</a> in order to use reCAPTCHA.</div>' \
					'<input type="hidden" name="recaptcha_challenge_field" value="manual_challenge" />' \
					'<input type="hidden" name="recaptcha_response_field" value="manual_challenge" />'
		params = {
			'captchahtml': chtml,
			}
		return self.render_template('password_reset.html', **params)
Exemplo n.º 7
0
 def render(self, name, value, attrs=None):
     return mark_safe(force_unicode(captcha.displayhtml(settings.RECAPTCHA_PUB_KEY)))
Exemplo n.º 8
0
 def render(self, name, value, attrs=None):
     return mark_safe(
         force_unicode(captcha.displayhtml(settings.RECAPTCHA_PUB_KEY)))