Hi I have this with the same error: from .common import db, session, T, cache, auth, logger, authenticated, unauthenticated from py4web.utils.auth import Auth
On Sunday, February 23, 2020 at 4:38:25 PM UTC+3, Ruslan Gareev wrote: > > Hi! Looks like no import of auth > > воскресенье, 23 февраля 2020 г., 7:28:10 UTC+5 пользователь Maurice Waka > написал: >> >> Using this code, >> >> File "apps/_scaffolds/controllers.py", line 82, in index >> db.posts.insert(message="Welcome "+auth_user.first_name+'.'+' Thank you for >> signing in with us. Blah blah blah.', author=auth.user_id, >> created_by=auth.user_id, modified_by=auth.user_id) >> >> >> I get an error: >> >> >> NameError: name 'auth_user' is not defined >> >> I also tried: >> >> >> Auth.first_name; >> auth.first_name; >> auth.user.first_name >> >> >> >> and the errors are the same >> >> >> Please help here. >> >> >> Regards >> >> -- 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 web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/cf945769-fa72-4293-93f3-7eb4b2a66f59%40googlegroups.com.