>
> links=[lambda row: A('View',_href=URL('view',args=[db.products,row.id]))],
>
First, note that the URL function produces a string, so putting db.products
in args is equivalent to str(db.products), which will result in just
"products".
> def view(table,id):
> return dict()
>
As noted
Ah, I think I know! The arguments are passed in request.args. Right?
On Tuesday, 21 January 2014 08:00:19 UTC-5, horridohobbyist wrote:
>
> Yes, I did. But I shouldn't have included arguments in the 'view'
> function. That was the error.
>
> So how do I extract the arguments 'products' and '11'
Yes, I did. But I shouldn't have included arguments in the 'view' function.
That was the error.
So how do I extract the arguments 'products' and '11' (in my example) in
the view function? response._vars apparently does not contain them.
Thanks.
On Tuesday, 21 January 2014 01:35:52 UTC-5, Johan
Did you create a function 'view' in the default controller?
Regards
Johann
On 21 January 2014 06:44, horridohobbyist wrote:
> I can't get this to work. I'm new to web2py. Perhaps I don't understand
> the argument-passing mechanism...
>
> In SQLFORM.grid, I have:
>
> links=[lambda row: A('View
I can't get this to work. I'm new to web2py. Perhaps I don't understand the
argument-passing mechanism...
In SQLFORM.grid, I have:
links=[lambda row: A('View',_href=URL('view',args=[db.products,row.id]))],
In the default controller, I have:
def view(table,id):
return dict()
I get the foll
Great. works perfect! Thanks a lot.
On Tue, Dec 20, 2011 at 10:14 PM, Cliff wrote:
> You can learn more here:
>
>
> http://web2py.com/books/default/chapter/29/7#SQLFORM.grid-and-SQLFORM.smartgrid-(experimental)
>
> On Dec 20, 8:57 pm, Jim Steil wrote:
> > Yes, you can pass a list of the tables
You can learn more here:
http://web2py.com/books/default/chapter/29/7#SQLFORM.grid-and-SQLFORM.smartgrid-(experimental)
On Dec 20, 8:57 pm, Jim Steil wrote:
> Yes, you can pass a list of the tables you want to display through the
> linked_tables parameter.
>
> grid = SQLFORM.smartgrid(db.custome
Yes, you can pass a list of the tables you want to display through the
linked_tables parameter.
grid = SQLFORM.smartgrid(db.customer, linked_tables=['note', 'order'])
Then it will only include buttons for the tables you've listed.
-Jim
On 12/20/2011 7:08 PM, Adi wrote:
is it possible to
is it possible to remove some of the related tables' buttons?
If you use jqueryui then the links are rendered as buttons.
On Oct 6, 1:42 pm, Javier Pepe wrote:
> Hello
>
> Along with the question of Johann, you can add new buttons to the grid
> / SmartGrid, because the links are render as links, and not as
> buttons.
>
> Thanks
>
>
>
>
>
>
>
> On Thu, Oct 6
Hello
Along with the question of Johann, you can add new buttons to the grid
/ SmartGrid, because the links are render as links, and not as
buttons.
Thanks
On Thu, Oct 6, 2011 at 9:36 AM, apple wrote:
> You can add your own buttons using:
>
> links = [lambda row: A('Edit',_href=URL("controller"
On 6 October 2011 14:36, apple wrote:
> You can add your own buttons using:
>
> links = [lambda row: A('Edit',_href=URL("controller","edit",
> args=["update", tablename, a.id]))
>
> and set editable, deletable, details to False.
>
>
>
Thanks!
Johann
--
May grace and peace be yours in abundan
You can add your own buttons using:
links = [lambda row: A('Edit',_href=URL("controller","edit",
args=["update", tablename, a.id]))
and set editable, deletable, details to False.
On Oct 6, 12:48 pm, Johann Spies wrote:
> How do I override the views/controllers triggered by the buttons menti
13 matches
Mail list logo