[web2py] Re: Convert languages.lazyT object to string

2018-02-12 Thread Jordan Ladora
Thank you both for your help and patience with this. Oversight on my part-- I was mistaken by the ticket thrown - the first ticket I got when running this was for the 'message' (which i tried to cast to string to fix it before i posted here) param in the email, but then after that i was getting

[web2py] Re: Convert languages.lazyT object to string

2018-02-08 Thread Anthony
On Thursday, February 8, 2018 at 2:49:52 PM UTC-5, Jordan Ladora wrote: > > Trying to get this to work but not getting anywhere- > > *from gluon import languages # EDITED from '* > > *from gluon import *'abc = languages.lazyT("abc")* > The lazyT class takes a "T" argument, which should be in inst

[web2py] Re: Convert languages.lazyT object to string

2018-02-08 Thread Leonel Câmara
Using str or to_native should work that's what I did here with the same objective (except in this case I was making a mailer class for sparkpost): https://github.com/leonelcamara/web2py_sparkpost/blob/master/modules/plugin_sparkpost.py The problem is how that message is being created. For some re

[web2py] Re: Convert languages.lazyT object to string

2018-02-08 Thread Jordan Ladora
Hi, I'm actually not trying to use it directly- I'm trying to convert a lazyT object (which is passed as email message text to make a reset password link by gluon/tools.py line 3637 in latest release) to a string bc I have an outside library (boto3) that expects a parameter (text of an email me

[web2py] Re: Convert languages.lazyT object to string

2018-02-08 Thread Leonel Câmara
Why are you trying to use lazyT directly? If you want to do that you need to build the lazyT class with a translator object. Something like: abc = languages.lazyT("abc", languages.translator('path_to_language_files', 'en')) -- Resources: - http://web2py.com - http://web2py.com/book (Documentat

[web2py] Re: Convert languages.lazyT object to string

2018-02-08 Thread Leonel Câmara
quinta-feira, 8 de Fevereiro de 2018 às 19:49:52 UTC, Jordan Ladora escreveu: > > Trying to get this to work but not getting anywhere- > > *from gluon import languages # EDITED from '* > > > > > > *from gluon import *'abc = languages.lazyT("abc")str(abc)abc.read()*...etc. > keeps throwing- > >