Hi All,
      Also, to add to above questions - How can we hide the query
button on the search area in sqlform.grid. And if its possible to hide
clear  button as well!!

Thanks, Rahul D (www.flockbird.com - web2py powered)
-----------------------------

On Dec 19, 3:06 pm, Rahul <rahul.dhak...@gmail.com> wrote:
> Hi All,
>       I was just wondering if I can use the row.id or any information
> withsqlform.grid-
> Below is the link I have defined to show a button called Send Request.
> I have re-directed it to use a custom function "regstatus" that passes
> a row.id argument.
> ---code---
> links = [lambda row: A(SPAN(_class='icon plus'),'Send
> Request',_class='positive
> button',_href=URL("default","reqstatus",args=[row.id]))]
> ---
> I want to know how can I use the row.id  (in above -> args=[row.id])
> value and use it to make queries -
> Example- I would like to send some request to the record (row id) on
> which I am say a friend request etc.
>
> How can I achieve it?
> Secondly - The button added via link is visible to me on the view as
> well. Example if I view the record with row.id==1 it shows the Send
> Request button on this view page as well. Can we hide it?
>
> Thanks, Rahul D (www.flockbird.com- web2py powered)
>
> On Dec 5, 6:55 am, Massimo Di Pierro <massimo.dipie...@gmail.com>
> wrote:
>
>
>
>
>
>
>
> > It odes not work that way. It will translate the string before the
> > substitution:
>
> > > python web2py.py -S welcome -M -N
> > >>> T.force('it')
> > >>> import os
> > >>> print os.path.getsize('applications/welcome/languages/it.py')
> > 4833
> > >>> T('%(test)s') % dict(test=1)
> > '1'
> > >>> print os.path.getsize('applications/welcome/languages/it.py')
> > 4857
> > >>> T('%(test)s') % dict(test=2)
> > '2'
> > >>> print os.path.getsize('applications/welcome/languages/it.py')
> > 4857
> > >>> T('%(test)s') % dict(test=3)
> > '3'
> > >>> print os.path.getsize('applications/welcome/languages/it.py')
>
> > 4857
>
> > as you can see the file size only grows the first time then it does
> > not grow any more.
>
> > On Dec 4, 6:43 pm, Pepe Araya <pepea...@gmail.com> wrote:
>
> > > Thanks!
>
> > > Massimo, I noticed that this line of *gluon/sqlhtml.py*
>
> > > 1754: message = error or T('%(nrows)s records found') % dict(nrows=nrows)
>
> > > add a new entry in the language file for every different search result. 
> > > ("1
> > > records found", "2 records found" .... )
>
> > > I think that %(nrows)s should be outside the T() helper.
>
> > > regards!
>
> > > pepe.

Reply via email to