Django

Code

Ticket #7005 (assigned)

Opened 8 months ago

Last modified 4 months ago

add orphans support for object_list pagination

Reported by: shadfc Assigned to: shadfc (accepted)
Milestone: post-1.0 Component: Generic views
Version: SVN Keywords: orphans object_list paginator
Cc: Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

When the new Paginator support was added to the object_list generic view, support for the orphans feature was left out. This could be enabled simply by including the orphans key in the dictionary passed to the view. It would, of course, only be used when the view is paginated.

info_dict = {
    'queryset' : Model.objects.all(),
    'paginate_by' : 10,
    'orphans' : 3,
}

Given this example, up to 13 objects would be included on a page, instead of only a hard limit of 10.

Attachments

object_list-orphans-support.diff (1.0 kB) - added by shadfc on 04/10/08 21:33:29.
patch against rev 7412 adding orphans support to object_list
misc-orphans-fixes-8147.diff (3.8 kB) - added by shadfc on 07/29/08 23:24:41.
orphan support for object_list, and documentation updates for generic views and paginator

Change History

04/10/08 21:33:29 changed by shadfc

  • attachment object_list-orphans-support.diff added.

patch against rev 7412 adding orphans support to object_list

04/10/08 21:34:19 changed by anonymous

  • needs_better_patch changed.
  • has_patch set to 1.
  • needs_tests set to 1.
  • needs_docs set to 1.

04/10/08 21:35:31 changed by anonymous

  • needs_better_patch set to 1.

06/14/08 07:27:57 changed by Simon Greenhill

  • stage changed from Unreviewed to Design decision needed.

07/06/08 20:46:57 changed by programmerq

  • milestone set to post-1.0.

07/29/08 23:24:41 changed by shadfc

  • attachment misc-orphans-fixes-8147.diff added.

orphan support for object_list, and documentation updates for generic views and paginator

07/29/08 23:30:17 changed by shadfc

  • owner changed from nobody to shadfc.
  • needs_better_patch deleted.
  • status changed from new to assigned.
  • needs_tests deleted.
  • needs_docs deleted.

Added a patch with documentation against rev 8147. This patch adds the orphans support to the object_list generic view and updates the documentation for it. It also updates the paginator documentation to include information about orphans.

I couldn't find any tests regarding object_list to update, and while that's not an excuse...

07/29/08 23:34:37 changed by shadfc

  • stage changed from Design decision needed to Accepted.

Add/Change #7005 (add orphans support for object_list pagination)




Change Properties
Action