#9798: object_list paginated raise a http404 when a its a InvalidPage
----------------------------------------+-----------------------------------
 Reporter:  zodman                      |       Owner:  nobody    
   Status:  new                         |   Milestone:            
Component:  Generic views               |     Version:  SVN       
 Keywords:  page paginator object_list  |       Stage:  Unreviewed
Has_patch:  0                           |  
----------------------------------------+-----------------------------------
 on views.generic.list_details.object_list
 {{{
         if not page:
             page = request.GET.get('page', 1)
         try:
             page_number = int(page)
         except ValueError:
             if page == 'last':
                 page_number = paginator.num_pages
             else:
                 # Page is not 'last', nor can it be converted to an int.
                 raise Http404
         try:
             page_obj = paginator.page(page_number)
         except InvalidPage:
             raise Http404
 }}}

 Let me check this case when i have a page with this url

 foo/bar/?page=10

 on page ten i have 3 objects showed.

 if i delete 3 objects the page its invalid not a Http404, because the page
 exist before erase ...

 its better do the same validator a example on paginator, if the page not
 exist get the latest page/objects.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9798>
Django <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 django-updates@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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to