[ZPT] Re: batching and sorting in one go
Casey Duncan
casey@zope.com
27 Jun 2002 16:50:35 -0400
On Thu, 2002-06-27 at 16:17, Michal Kurowski wrote:
> Casey Duncan [casey@zope.com] wrote:
>
> > You know because the column to sort on is passed in the request. You
> > pass this along to the sql method and use it to display the user
> > interface correctly.
> >
> > Re-rendering the template is a matter of creating a link to itself that
> > passes the desired sorting parameters.
> >
>
> I know it's basics but there's what I got:
>
> Error Value: exceptions.TypeError on object of type 'string' is not callable in ""
> when I try:
>
> if variable != '' and mode != '':
> out = context.getJobs_sorted(variable=variable, mode=mode)
>
> return context.REQUEST['URL0'](results=out)
REQUEST['URL0'] is just a url string. You cannot call it.
It looks to me like you are trying to construct a link, or call the
template, I'm not sure which.
I think you may have too many separate scripts. What is this Python
script supposed to do exactly?
I assume getJobs_sorted is the ZSQL method right? Why not call it
directly from ZPT or the batching script? Is this the batching script?
>
> and from the ZPT:
>
> tal:attributes="href python: here.pass_sorted(variable='status', mode='asc')
>
> Help ?
>
> --
> Michal Kurowski
> <michal@genesilico.pl>