Thanks a lot, ... Niphlod.
When I do a simpler version, the web shell will give me "an error occured,
please reload." when I try: print row.user_id.email. Then I basically have
to restart web2py.py again to get the shell back. Reload won't work.
I am wondering if auth tables has to be logged in to use? Since I was
either querying the tables in scheduler (in actual deployment) or in web
admin shell.
I can tell the reference is working, since this code work fine showing the
user's first name and last name in the user_id section.
if request.args(0)=='profile':
db.auth_criteria.user_id.default = auth.user.id
record = db.auth_criteria(db.auth_criteria.user_id.default)
formFil=SQLFORM(db.auth_criteria,
record=record,
labels = {'salePrice':XML('By Sale Price')},
buttons = [TAG.button('Set Mine', _class='btn-primary')])
But I cannot get recursive attributes in either web shell or scheduler
tasks.
On Tuesday, September 16, 2014 1:27:58 PM UTC-7, Niphlod wrote:
>
> the requires attribute just sets a validator that is called upon form
> validation, so it's correct that by itself doesn't produce a "link", as you
> call it.
>
>
> Did you try with a simpler model to pinpoint the cause ?
>
> i.e.
>
> db.define_table('auth_criteria',
> Field('user_id', 'reference auth_user'),
> )
>
>
>
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.