when i just use response.render without a dict , for ex...
response.render('templates/email_verification.html')
i get an error about invalid "!" in the template
[image: Imagem inline 1]
2016-11-21 13:21 GMT+00:00 Leonel Câmara <[email protected]>:
> username is passed by auth, and it's not necessarily the "username" field
> it can be the email if you're not using an username.
>
> Basically after register if you have registration_requires_verification
> auth send an email where the body is defined as
>
> d = dict(form.vars) # form.vars holds the registration form values
> d.update(dict(key=key, link=link, username=form.vars[username])) #
> exactly what username is, is defined earlier according to your settings
> email_body = messages.verify_email % d
>
>
> You can actually build verify_email using html helpers if you aren't being
> able to do it with response.render
>
> auth.messages.verify_email = HTML(
> HEAD(),
> BODY(
> H1(T('Welcome to MY AMAZING WEBSITE'
> )),
> P(T('Click on the link below to check
> your e-mail'), ':'),
> A(URL(r=request,c='default',f='user',
> args=['verify_email'], scheme=True, host=True) + '/%(key)s ', _href=URL(r=
> request,c='default',f='user',args=['verify_email'], scheme=True, host=True
> ) + '/%(key)s '),
> P(T('Thank You')),
> P(T('From MY AMAZING WEBSITE')),
> )
> ).xml()
>
> Another alternative is to just use a string with HTML in there.
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.