here's how i'm using it: 16 class index: 17 def GET(self): 18 welcome = 'Welcome' 19 return render.index(welcome)
20 21 class books: 22 def GET(books): 23 db = web.database(dbn='mysql', user='root', pw='', db='books ') 24 showbooks = db.select('books' order='title', offset=10, limit=20)
25 return render.books(showbooks)
Greg Milby
unread,
Nov 8, 2009, 6:10:50 AM11/8/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to we...@googlegroups.com
nvm - i forgot a comma - thank you will try your code below - adapt it to this. thanks for the help
Greg Milby
unread,
Nov 8, 2009, 6:19:53 AM11/8/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to we...@googlegroups.com
i tried that - liked the idea, but it didn't go well. i wrote ascript to make the js (jQuery) data format - but if you look, it displays tons of empty pages at the end, was never able to figure out why - data is formatted to jQuery spec's http://pairadice.no-ip.org/booknook/virt/
Justin Caratzas
unread,
Nov 8, 2009, 2:19:39 PM11/8/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to we...@googlegroups.com
I'm assuming you got that problem fixed, because I just checked that link and it seems to work fine. The last 8 pages or so have data.
Justin
ps. Is this for the Book Nook franchise of used book stores? I love that place.
Greg Milby
unread,
Nov 8, 2009, 12:32:40 PM11/8/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to we...@googlegroups.com
yes, i actually discovered what was wrong on the jquery pagination. i may run with that since it would reduce the load on the webserver. thank you
Angelo Gladding
unread,
Nov 8, 2009, 12:58:03 PM11/8/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to we...@googlegroups.com
Keep in mind non-js users!! :) The load is likely to be mostly on the database end anyway.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to we...@googlegroups.com
creating, handling and manipulating the db requests is the bulk of my load... i do not mind it, but why push spikes if i don't have to?
Greg Milby
unread,
Nov 8, 2009, 5:43:15 PM11/8/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to we...@googlegroups.com
i would still like to know how to paginate in python *if anyone has figured it out - even though i will probably use jquery. i do not know where to begin with passing the links/code in and out of the template layer...
21 class books: 22 def GET(books): 23 db = web.database(dbn='mysql', user='root', pw='', db='books')
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to we...@googlegroups.com
use a hidden field for the current page number, then set the offset to page * limit. atleast, thats how i've seen it done before. that could be taken a step further by ajax.