Re: [web2py] Re: Why do I get a blank screen on view

2017-06-20 Thread Anthony
On Tuesday, June 20, 2017 at 11:25:20 AM UTC-4, Maurice Waka wrote: > > I did this: > replies = db().select(db.answers.ALL, orderby=auth.user.id) > orderby must be a Field object, not an integer value. > > could it be because am using the same local ip(127.0.0.8000) address when > trying out d

Re: [web2py] Re: Why do I get a blank screen on view

2017-06-20 Thread Maurice Waka
I did this: replies = db().select(db.answers.ALL, orderby=auth.user.id) could it be because am using the same local ip(127.0.0.8000) address when trying out different users and get the same result? On Sat, Jun 17, 2017 at 8:25 PM, Anthony wrote: > auth.user_id is the id of the logged in user o

Re: [web2py] Re: Why do I get a blank screen on view

2017-06-17 Thread Anthony
auth.user_id is the id of the logged in user or None if the current user is not logged in. There is no "default" user. Unless the "quest" and "report" fields are sometimes set to None rather than an actual user id, your second set of queries will never return any results. Anthony On Saturday,

Re: [web2py] Re: Why do I get a blank screen on view

2017-06-17 Thread Maurice Waka
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=r

Re: [web2py] Re: Why do I get a blank screen on view

2017-06-15 Thread Maurice Waka
Thanks. Once logged in I'll fix it. Regards On Jun 15, 2017 09:19, "Anthony" wrote: > On Thursday, June 15, 2017 at 1:48:51 AM UTC-4, Maurice Waka wrote: >> >> Sorry. Am not sure about value of Auth.user_id >> > > It is the id of the current logged in user. You can simply display it on > the pag

Re: [web2py] Re: Why do I get a blank screen on view

2017-06-14 Thread Anthony
On Thursday, June 15, 2017 at 1:48:51 AM UTC-4, Maurice Waka wrote: > > Sorry. Am not sure about value of Auth.user_id > It is the id of the current logged in user. You can simply display it on the page or print it to the console to inspect it. Anthony -- Resources: - http://web2py.com - http:

Re: [web2py] Re: Why do I get a blank screen on view

2017-06-14 Thread 黄祥
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)

Re: [web2py] Re: Why do I get a blank screen on view

2017-06-14 Thread Maurice Waka
Sorry. Am not sure about value of Auth.user_id On Jun 15, 2017 07:25, "Anthony" wrote: > What is the value of auth.user_id? Are you sure there are records in the > database whose "post_by" value is equal to it? > > On Thursday, June 15, 2017 at 12:03:54 AM UTC-4, Maurice Waka wrote: >> >> when t