Hi fellows,
Am very confused about the paginator implementation.
I am using 0.95 version and I implemented a generic view using
list_detail.object_list and works
very good. Basically that I have is :
url.py:
requests_list = {
    'queryset' :  Request.objects.all(),
    'template_name': 'admin/req_list.html',
    'paginate_by' : 1,
}
urlpatterns = patterns('',
           (r'^admin/req_list/$', list_detail.object_list,
requests_list),
       )
Doing that,  in the template I call for {% object_list %} to get the
objects.
Also I had notice the has_previous, has_next, pages vars that can be
useful. But the thing
is that am trying to do a Paginator Tag (the same that is used in
admin view), to do that I should use something like: {% for page_num
in pages_numbers %} , and the pages_numbers should be come from
range(pages) and generic view doesn't implement :(

I hear that you can get page_number doing a hack on the generic view,
but I don't want to do that.
And I found an implementation_   http://code.djangoproject.com/wiki/PaginatorTag
and
then I found another with some enhancements  
http://www.djangosnippets.org/snippets/73/
But in both codes I don't see the object that had been returned to the
view, only the pages information.

So the questions, how is the correct way to implement paginator in
0.96?
Those codes can works by itself, or they need that a generic view
(object_list) be implemented too?
 After extending the template, I need to do a change on settings.py
and url.py or is just called from some view with render_to_response ?


thanks .-


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to