Sorry I forgot. It is in trunk now. Please check it. Now I have to
revise the book once more. :-(

On Aug 4, 3:55 pm, Vidul Petrov <vidul.r...@gmail.com> wrote:
> Hi Massimo,
>
> I sent you an email with a Mercurial diff about retrieve_(username/
> password) settings and captcha:
>
> diff -r 3e0d95c0a0d5 gluon/tools.py
> --- a/gluon/tools.py    Sun Aug 01 04:53:46 2010 -0500
> +++ b/gluon/tools.py    Sun Aug 01 18:38:00 2010 +0300
> @@ -804,6 +804,8 @@
>          self.settings.mailer = None
>          self.settings.login_captcha = None
>          self.settings.register_captcha = None
> +        self.settings.retrieve_username_captcha = None
> +        self.settings.retrieve_password_captcha = None
>          self.settings.captcha = None
>          self.settings.expiration = 3600         # one day
>          self.settings.long_expiration = 3600*30 # one month
> @@ -1677,7 +1679,8 @@
>          request = self.environment.request
>          response = self.environment.response
>          session = self.environment.session
> -
> +        captcha = self.settings.retrieve_username_captcha or \
> +                (self.settings.retrieve_username_captcha!=False and
> self.settings.captcha)
>          if not self.settings.mailer:
>              response.flash = self.messages.function_disabled
>              return ''
> @@ -1702,6 +1705,10 @@
>                         delete_label=self.messages.delete_label,
>                         formstyle=self.settings.formstyle
>                         )
> +        if captcha:
> +            form[0].insert(-1, TR(LABEL(captcha.label),
> +                                      captcha,captcha.comment,
> +                                      _id = 'capctha__row'))
>          if form.accepts(request.post_vars, session,
>                          formname='retrieve_username', dbio=False,
>
> onvalidation=onvalidation,hideerror=self.settings.hideerror):
> @@ -1894,6 +1901,8 @@
>          request = self.environment.request
>          response = self.environment.response
>          session = self.environment.session
> +        captcha = self.settings.retrieve_password_captcha or \
> +                (self.settings.retrieve_password_captcha!=False and
> self.settings.captcha)
>
>          if next == DEFAULT:
>              next = request.get_vars._next \
> @@ -1920,6 +1929,10 @@
>                         delete_label=self.messages.delete_label,
>                         formstyle=self.settings.formstyle
>                         )
> +        if captcha:
> +            form[0].insert(-1, TR(LABEL(captcha.label),
> +                                      captcha,captcha.comment,
> +                                      _id = 'capctha__row'))
>          if form.accepts(request.post_vars, session,
>                          formname='reset_password', dbio=False,
>
> onvalidation=onvalidation,hideerror=self.settings.hideerror):
>
> My question is - should I hope to see this in trunk or not?
>
> I am happy to see so many updates each day, but I am unhappy to see
> that there is not one single web2py version (in other words stable)
> that has no bugs (not to mention fully documented).

Reply via email to