Le 28/09/2015 20:53, Leonel Câmara a écrit : > I think you are calling browser_email() from another controller > function like if it was a regular python function, browser_email then > changes the view the calling controller will use which then causes the > problem you are seeing. > > You need to use response.render to create your email in browser_email > instead of changing response.view and preferably also make > browser_email a regular function instead of a controller one.
I tried the render option before : it doesn't change a thing.. Yet.
def browser_email(): context = dict(
verification_url_on_site_enabled=False,
illustration_image_enabled=False,
main_title_enabled=False
)
return response.render('templates/email_verification.html', context)
Because I'm not sure to understand what you mean by "make it
a regular function" ? Put it in a module or a model file ? But how
can I call it then ? If it's not from a controller ?
Thank you,
--
“One original thought is worth a thousand mindless quotings.”
“Le vrai n'est pas plus sûr que le probable.”
Diogene Laerce
--
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.
signature.asc
Description: OpenPGP digital signature

