db.define_table('answers', Field('quest', 'text', default =auth. user_id) , Field('report', 'text', default =auth. user_id) auth.signature )
On default controller : - replies = db(db.answers).select() - return dict(replies=replies) With this I still have the same problem where all posts by logged in users are viewed instead of the specific ones by the default user. If I do this on default controller: 1. questions = db(db.answers.quest == auth.user_id).select() 2. replies = db(db.answers.report == auth.user_id).select() I still get a blank screen. On Jun 15, 2017 09:08, "黄祥" <steve.van.chris...@gmail.com> wrote: > just an idea, why not put the default value for that fields? > e.g. > default = auth.user_id > > best regards, > stifan > > -- > 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 a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/web2py/Msoj2qZO7RU/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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. For more options, visit https://groups.google.com/d/optout.