Why not:

auth.messages.verify_email = 'Click on the link
http://%(env)s/%(url)s/%(key)s to verify your email' \

                              % dict(env=request.env.http_host,
url=URL(...), key= lambda : lazy_get_the_key())

Should this works? being lazy_get_the_key() a function which selects
the current user to interpolate.





*Bruno Cezar Rocha** - @rochacbruno*
[email protected] | Mobile: +55 (11) 99210-8821
www.CursoDePython.com.br | www.rochacbruno.com.br
Blog: Loading html elements dynamically with web2py and ajax
<https://rochacbruno.snipt.net/loading-html-elements-dynamically-with-web2py-and-ajax/>
  Get a signature like this.
<http://r1.wisestamp.com/r/landing?promo=18&dest=http%3A%2F%2Fwww.wisestamp.com%2Femail-install%3Futm_source%3Dextension%26utm_medium%3Demail%26utm_campaign%3Dpromo_18>
Click
here.<http://r1.wisestamp.com/r/landing?promo=18&dest=http%3A%2F%2Fwww.wisestamp.com%2Femail-install%3Futm_source%3Dextension%26utm_medium%3Demail%26utm_campaign%3Dpromo_18>



On Mon, Aug 13, 2012 at 10:31 PM, Anthony <[email protected]> wrote:

> Actually, the book is a bit confusing there -- the example code appears to
> be complete as is.
>
> Anthony
>
>
> On Monday, August 13, 2012 9:09:46 PM UTC-4, JoeCodeswell wrote:
>>
>> Dear web2py folks,
>>
>> In the book it says in /chapter/29/9#Authentication:
>>
>>
>> In Auth, by default, email verification is disabled. To enable email,
>>> append the following lines in the model where auth is defined:
>>>
>>>
>>> 1.
>>> 2.
>>> 3.
>>> 4.
>>> 5.
>>> 6.
>>> 7.
>>> 8.
>>> 9.
>>> 10.
>>> 11.
>>>
>>>
>>> auth.settings.registration_**requires_verification = False
>>> auth.settings.registration_**requires_approval = False
>>> auth.settings.reset_password_**requires_verification = True
>>> auth.messages.verify_email = 'Click on the link http://' + \
>>>
>>>     request.env.http_host + \
>>>     URL(r=request,c='default',f='**user',args=['verify_email']) + \
>>>
>>>     '/%(key)s to verify your email'
>>> auth.messages.reset_password = 'Click on the link http://' + \
>>>
>>>     request.env.http_host + \
>>>     URL(r=request,c='default',f='**user',args=['reset_password']) + \
>>>
>>>     '/%(key)s to reset your password'
>>>
>>> You need to replace the string
>>>
>>>
>>> 1.
>>>
>>> 'Click on the link ...'
>>>
>>> in auth.messages.verify_email with the proper complete URL of the
>>> action verify_email.
>>
>>
>>
>>
>> For both verify_email and reset_password:
>>  Should I replace
>>
>> 'Click on the link http://'
>> With:
>> 'Click on the link http://myserver.com/myapp/'
>> Or with:
>> 'Click on the link http://myserver.com/myapp/defa**ult/user/verify_email'
>> My guess is the first, but because the book says "proper complete URL", I am 
>> not sure.
>>
>> Thanks in advance for the help.
>>
>> Love and peace,
>>
>> Joe
>>
>>
>>
>>
>>  --
>
>
>
>

-- 



Reply via email to