[albatross-users] Having trouble implementing pagination

Damien Elmes alb-users at repose.cx
Wed Oct 1 00:24:44 EST 2003


"Michael C. Neel" <neel at mediapulse.com> writes:


> <al-for expr="c.fetchall()" iter="row" pagesize="20">
> 	<al-exec expr="record = row.value()">
> 	A: <al-value expr="record['a']">
> </al-for>
>
> ..should work ok.  I say should because I don't use the dict cursor, but
> iirc it returns a tuple of dicts, which should be just fine with the
> Iterator class of albatross.
>
> The gothca here is that the query will be preformed for every page
> (which you can work around) and the entire result set will be stored in
> the session (which you can't work around).

Really? I was under the impression assigning to a variable in locals
will only change the context during that page display. I haven't
played with the persistent implementations like mod_python, but I
think a new context is created for each service (with any session
variables being imported each time).

Cheers,
-- 
Damien Elmes



More information about the Albatross-users mailing list