Most of the time ObjectionPaginator server incomplete functionality
because some one have to generate a page bar[<Prev 1 2 3 .. 10 11
12 .. 18 19 20 Next >] in template. However some a kind of template
tag would allow you to create a small tiny hack but not a generic one.
I just looked inside django.contrib.admin and I think it is fairly
possible and strongly believe Django should include it in its package.
Proposal:
To write a GenericPaginator class which should render page bar in
template if a template tag is encountered.
-It Should form querystring
-A decent Page bar
-Multiple Object support in a single template
Just open for your opinion, in case if it comes out to be useful then
I'll put a ticket on Trac.
Regards,
Deepak Thukral
I also looked into django.contrib.admin for that <Prev 1 2 3 .. 10 11 Next> thing and wanted to reuse the code there but ended in coding it myself.
greets
Philipp
http://www.djangosnippets.org/snippets/378/
I extended a different snippet to do what I wanted. Posted it just now
at [1]. I do think that this needs to be looked at, for my first
django project, this was one of the major stumbling blocks for me.
(Which I think is about as good of an endorsement for django as any
other)
[1] http://www.djangosnippets.org/snippets/394/
Paul Davis
> http://www.djangosnippets.org/snippets/394/
bit closer (should have used query string ?p=1 instead of /page/1)
But still I prefer the way django.contrib.admin is doing. The core
question is it should be included in django standard package? I
implemented one the way django.contrib.admin is doing. http://dpaste.com/17864/
Deepak
I definitely wrestled with this. I ended up going without the query
string cause from the examples i saw it looked like the 'django way'
of doing things.
> But still I prefer the way django.contrib.admin is doing. The core
> question is it should be included in django standard package? I
> implemented one the way django.contrib.admin is doing. http://dpaste.com/17864/
>
> Deepak
>
>
And I vote yes to including a version similar to yours.
Paul Davis