[albatross-users] Trying to work around pagnation with colsissue...

Michael C. Neel neel at mediapulse.com
Tue Jun 24 06:54:41 EST 2003


Ignore this; turns out I had an iter="row" hidden away in a macro
causing a problem with this one.  Odd that I was allowed to do that when
one was in page mode the other not.

Thanks,
Mike

     > -----Original Message-----
     > From: Michael C. Neel 
     > Sent: Monday, June 23, 2003 10:22 AM
     > To: albatross-users at object-craft.com.au
     > Subject: RE: [albatross-users] Trying to work around 
     > pagnation with colsissue...
     > 
     > 
     >      > A slightly nicer way of writing this might be:
     >      > 
     >      >     photos = [...]
     >      >     ctx.locals.photos = []
     >      >     i = 0
     >      >     while 1:
     >      >         row = photos[i:i+3]
     >      >         if not row: break
     >      >         ctx.locals.photos.append(row)
     >      >         i = i+3
     >      > 
     >      > But that wasn't the question ;-)
     >      > 
     > 
     > I've been trying to adopt the python "feeling" that i's 
     > are bad and not
     > needed.  My days as a C programmer reach for the C for 
     > loop (which is
     > what this really is, for(i=0, 1; i++)) but then I say no 
     > I should do it
     > without that because it's not the python way.  Now I 
     > find the above a
     > lot harder to read, lol.
     > 
     >      > 
     >      > What type of app (stateful/random, session in 
     >      > form/file/server etc) are
     >      > you writing and what version of Albatross are you using?
     >      > 
     > SimpleApp; Apache 1.3x; mod_python.  Using pagnation all 
     > over the place,
     > and for some odd reason this is the only one breaking.
     > 
     > I haven't gone to the pre-release because I have several 
     > Albatross sites
     > on the server so upgrading will be a real pain.  Is 
     > there some way to
     > install it as a different name; i.e. albatrosspre110 so 
     > I could have it
     > side by side with 1.01?  I tried installing it in the 
     > modules folder
     > with the app, but mod_python doesn't seem to wanna 
     > change the path order
     > (it will work command line, importing the right one, but 
     > not under
     > mod_python).
     > 
     > Mike
     > _______________________________________________
     > Albatross-users mailing list
     > Albatross-users at object-craft.com.au
     > https://www.object-craft.com.au/cgi-bin/mailman/listinfo/
albatross-users



More information about the Albatross-users mailing list