Jian
Jian

Reputation: 47

it comes out 400 not found when I click edit or delete button in smartgrid in web2py

I think maybe it is because that the url:a/c/f/x. when the url is like this:a/c/f,it works ok, but when add args into URL like this:a/c/f/x. It comes out 400 not found when I click edit or delete button in smartgrid in web2py.Does the args account for this problem? Thanks!

Upvotes: 0

Views: 32

Answers (1)

Anthony
Anthony

Reputation: 25536

If your smartgrid URL includes args that are not generated by the grid itself, then you must tell smartgrid to preserve those args via the "args" argument. For example, if your base URL includes a single URL arg after the function (e.g., /a/c/f/arg1), then you would do:

grid = SQLFORM.smartgrid(..., args=request.args[:1])

For more details, see the documentation.

Upvotes: 1

Related Questions