Yes, REST is definitely simpler. I'm not too familiar with JavaScript.
Let me explain what I'm trying to do...
I have two SQLFORM.grids on the same page. The user clicks on one row of
one grid to add that row to the other grid. A simple enough application
pattern.
Just like when you click on
I think there's a warning in the book against two grids on the same page.
I've never tried it due to the warning, but state of the grid is maintained
via data passed back in the request. I think the grid code assumes that any
grid state data passed back applies to it, so two grids may both
Two grids in the same page are definitively not allowed unless loaded via
Ajax. That is because they use the URL to transfer grid parameters and if
you have two it is not clear which one applies to.
On Sunday, 2 March 2014 14:45:37 UTC-6, Tim Richardson wrote:
I think there's a warning in the
type 'exceptions.TypeError' redirect() got an unexpected keyword argument
'vars'
On Friday, 28 February 2014 18:34:54 UTC-5, Tim Richardson wrote:
In my slice on inline-editable grid (
http://www.web2pyslices.com/slice/show/1928/basic-inline-editing-in-sqlformgrid-no-plugin-no-javascript
)
Notice in Tim's example, vars is an argument of URL().
On Saturday, March 1, 2014 7:40:36 AM UTC-5, horridohobbyist wrote:
type 'exceptions.TypeError' redirect() got an unexpected keyword
argument 'vars'
On Friday, 28 February 2014 18:34:54 UTC-5, Tim Richardson wrote:
In my slice on
Okay, then, I see another issue...
Right now, I'm trying to execute the function by using a link:
links=[lambda row:
A('Add',_href=URL('add',args=[db.videos,row.id,user_id]))],
But this means a new request in the Add function. I really should execute a
function *in-place* on the current
I'm probably not following you, but if you want the server to do something
resulting in new content on the page, you either instigate a new request
via a URL (which I think is known as the REST method), or use AJAX to
fetch data from the server (and then use javascript to update part of the
In my slice on inline-editable grid
(http://www.web2pyslices.com/slice/show/1928/basic-inline-editing-in-sqlformgrid-no-plugin-no-javascript)
I do this to reload
redirect(URL('default','editable_grid',vars=request._get_vars)),
) #preserving _get_vars means user goes back to same grid page, same
8 matches
Mail list logo