py4web 0.1.20200210.2 installed
Created "myapp" from scaffold


Traceback (most recent call last):

  File "C:\Python37\lib\site-packages\py4web\", line 547, in wrapper

    ret = func(*func_args, **func_kwargs)

  File "C:\Python37\lib\site-packages\py4web\", line 508, in wrapper

    ret = func(*args, **kwargs)

  File "apps\myapp\", line 36, in index

    message = T("Hello {first_name}".format(**user))

KeyError: 'first_name'

I think the app needs at first a registered user, but @authenticated() does
not ask for.

def index():
    user = auth.get_user()
    message = T("Hello {first_name}".format(**user))
    return dict(message=message, user=user)

Regards Martin

- (Documentation)
- (Source code)
- (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 view this discussion on the web visit

Reply via email to