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
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
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,
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
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
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:
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)
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
8 matches
Mail list logo