#3391: [patch] django.views.generic.list_detail.object_list - add context
variables on pagination
--------------------------------------------+-------------------------------
Reporter:  Max Derkachev <[EMAIL PROTECTED]>  |       Owner:  jacob        
  Status:  new                              |   Component:  Generic views
 Version:  SVN                              |    Keywords:               
   Stage:  Unreviewed                       |   Has_patch:  1            
--------------------------------------------+-------------------------------
 The patch is for django.views.generic.list_detail.object_list and the
 docs.
 It adds the following variables to context, when the paginated object_list
 is required:
 1. pages_list - the list of page numbers;
 2. page_start - the number of the first item on the page;
 3. page_end - the number of the last item on the page.
 
 They are obviously missing, and are very useful when one need to construct
 pagination control like this:
 
 {{{
 PREV 1 2 3 4 5 6 7 NEXT
 showing 10-20 of 100 items
 }}}
 
 the template source will be like this:
 
 {{{
 <a href="#">PREV</a>
 {% for page_num in pages_list %}
 {{ page_num }}
 {% endfor %}
 <a href="#">NEXT</a>
 showing {{ page_start }}-{{ page_end }} of {{ hits }}
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3391>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to