Re: [Django] #15128: Generic view paginator: read paginate_by from GET

2011-01-21 Thread Django
#15128: Generic view paginator: read paginate_by from GET
--+-
  Reporter:  themax...@gmail.com  | Owner:  nobody  
  
Status:  closed   | Milestone:  
  
 Component:  Generic views|   Version:  1.2 
  
Resolution:  wontfix  |  Keywords:  generic view 
paginator
 Stage:  Unreviewed   | Has_patch:  0   
  
Needs_docs:  0|   Needs_tests:  0   
  
Needs_better_patch:  0|  
--+-
Changes (by russellm):

  * status:  new => closed
  * needs_better_patch:  => 0
  * resolution:  => wontfix
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 I'm not convinced this is something important enough that it should be
 baked into the core API.

 The current page is indisputably an issue of access -- I need the third
 page of results. Choosing 10 items per page rather than 15 or 100 is a
 matter of design, and shouldn't be (by default) exposed to the end-user.

 If you want to enable this functionality, you can implement a
 get_paginate_by() method that calls on self.request.GET.get('paginate_by).
 That means that what you describe is possible, just not baked in by
 default.

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #15128: Generic view paginator: read paginate_by from GET

2011-01-20 Thread Django
#15128: Generic view paginator: read paginate_by from GET
+---
 Reporter:  themax...@gmail.com |   Owner:  nobody
   Status:  new |   Milestone:
Component:  Generic views   | Version:  1.2   
 Keywords:  generic view paginator  |   Stage:  Unreviewed
Has_patch:  0   |  
+---
 Just a sample:
 {{{
 paginate_by = int( request.GET.get('paginate_by', paginate_by) )
 if extra_context is None: extra_context = {}
 queryset = queryset._clone()
 if paginate_by:
 paginator = Paginator(queryset, paginate_by,
 allow_empty_first_page=allow_empty)
 if not page:
 ...
 }}}

 This will allow to change "paginate_by" parameter on the fly on the same
 manner as "page".

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.