Re: Pagination with bound form

2010-10-15 Thread Devin M
Wait looks like i made an error. http://testsite.com/page/{%pk - 1%}>Previous Page and you might not be able to use pk so see if you can use data.pk let me know if it works. Regards, Devin M On Oct 15, 6:56 am, Devin M wrote: > Oh you want just one record per page? Thats easy. > urls.py > (r'^pag

Re: Pagination with bound form

2010-10-15 Thread Devin M
Oh you want just one record per page? Thats easy. urls.py (r'^page/(?P\d+)/$', 'data.views.pagelisting'), views.py def pagelisting(request, page_number): data_list = Data.objects.filter(pk=page_number) return render_to_response('list.html', {"data_list": data_list}) template list.html {%

Re: Pagination with bound form

2010-10-15 Thread David
Hi Devin Thank you for your reply. I'm not sure if I've explained myself properly, or if I'm misinterpreting your reply. What I am aiming for is a form containing a single record. At the bottom of this form will be the pagination tools << Prev 1 2 3 etc. which will enable the user to navigate thr

Re: Pagination with bound form

2010-10-15 Thread Devin M
So you have a page number thats getting passed from a url, right? and then you want to display records based on that page number? you could do something like this: urls.py (r'^page/(?P\d+)/$', 'data.views.pagelisting'), views.py def pagelisting(request, page_number): records = range(page_numbe

Pagination with bound form

2010-10-15 Thread David
Hello I need to be able to create a form that contains data from my database. It also needs to have basic pagination at the bottom of the form as there will be many records, and I would like my users to be able to use pagination to access them (kind of like MS Access). I can produce the form ok,