Are you saying the inclusion of the "links" argument in the grid is causing
mere loading of the grid to result in a not authorized message, or do you
get that message when you actually click a link? Does the link point back
to the grid action, or is view_order a separate function? In general, the
grid itself should only return a not authorized message if
user_signature=True (which is the default) and the requested URL doesn't
meet the appropriate criteria.
Anthony
On Tuesday, January 28, 2014 7:56:25 AM UTC-5, horridohobbyist wrote:
>
> I have the following:
>
> In db.py:
>
> db.define_table('orders',
> Field('buyer_id',db.auth_user,readable=False),
> Field('order_date','datetime'),
> Field('status'))
>
> In index.html:
>
> {{=SQLFORM.grid(db.orders,
> maxtextlength=1000,
> paginate=20,
> sortable=False,
> searchable=False,
> details=False,
> editable=False,
> deletable=False,
> create=False,
> *links=[lambda row: A('view',_href=URL('view_order',args=[db.orders,row.id
> <http://row.id>]))],*
> csv=False)
> }}
>
> Why is the "links=..." causing the (flash) error message "not authorized"?
> I'm able to use "links=..." elsewhere without any problem.
>
> Thanks.
>
--
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/groups/opt_out.