Just ran into and fixed this problem after much trial and error. In short, the URL that links to this controller method needs to have the user_signature=True attribute: In our case this was a link from another form grid:
...
links=[
dict(
header='Manage',
body=lambda row: A(SPAN(' Members', _class='fa fa-user-circle'),
_href=URL('membership', args=[
row.id],
user_signature=True),
_class='btn btn-primary btn-sm'
)
)
],
...
We noticed that if we switched the URL
args to
vars it also worked. We wanted the pretty URL though so found that the user_signature worked. One other thing to note: If you plan to use
args like we did here the SQLform.grid on the recipient page will need the
args=request.args[:1] or similar attrbute so all of its automatically generated links will include the
args as well.
grid = SQLFORM.grid(
...
args=request.args[:1], ...
)
Dave