On Mar4, 9:45pm, mdipierro <[email protected]> wrote:
> On Mar 4, 6:45 am, Iceberg <[email protected]> wrote:
>
> > The last problem is that out-of-box scaffold20090301b.tar on web2py
> > 1.56.4 always reports:
> > TypeError: unsupported operand type(s) for %: 'lazyT' and 'dict'
> > when I trying to register a new user. I don't have any experience
> > about T(...) yet and will check it later and will solve it eventually.
> > Just curious why this happen in an out-of-box scaffold for me, but
> > nobody reports this problem. Mmmm
>
> For the auth messages coontaining %s must do str(T("....")) instead of
> T("...")
>
Thanks for the hint! So I fount out that Alex uses str(T(...)) in two
auth messages but forgot this one: self.messages.verify_email
Instead of patching this (and possible future same mistakes one by
one), I try an setup-and-forget approach and it works. Share as below:
class MyAuth(Auth):
def __init__(self, environment, T, db = None):
T=lambda s,T=T:str(T(s)) # Insert this line
..........
I do not know whether it'd better be a build-in feature of the
original Auth.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---