Django

Code

Ticket #3181 (closed: duplicate)

Opened 2 years ago

Last modified 2 years ago

[patch] list_detail.object_list doesn't support custom querysets

Reported by: arockstar@gmail.com Assigned to: jacob
Milestone: Component: Generic views
Version: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

It'd be great if the generic object paginator view (list_detail.object_list) would accept a custom queryset (as described in the custom model Manager docs here) -- that is, a list of fully-fetched model objects.

The backend of the view (paginator.ObjectPaginator) has explicit support for lists, but object_list calls queryset._clone which fails for list objects.

Attachments

list_detail.patch.txt (1.0 kB) - added by arockstar@gmail.com on 12/22/06 00:09:30.
Patch for list_detail
list_detail.patch (1.0 kB) - added by anonymous on 12/22/06 00:10:44.
Patch for list_detail

Change History

12/22/06 00:09:30 changed by arockstar@gmail.com

  • attachment list_detail.patch.txt added.

Patch for list_detail

12/22/06 00:10:44 changed by anonymous

  • attachment list_detail.patch added.

Patch for list_detail

12/22/06 00:11:48 changed by arockstar@gmail.com

  • status changed from new to closed.
  • resolution set to fixed.
  • summary changed from list_detail.object_list doesn't support custom querysets to [patch] list_detail.object_list doesn't support custom querysets.

Proposed patch which checks to see if the queryset we passed in is a queryset, otherwise, we assume it's a list.

Other generic paged-views (date_based, object_detail) still assume a queryset.

12/22/06 00:12:48 changed by arockstar@gmail.com

  • status changed from closed to reopened.
  • resolution deleted.

Ug. Sorry. Wrong fields checked by accident

12/22/06 00:16:54 changed by anonymous

  • status changed from reopened to closed.
  • resolution set to duplicate.

12/22/06 01:03:25 changed by Gary Wilson <gary.wilson@gmail.com>

  • status changed from closed to reopened.
  • resolution deleted.

Please specify the ticket this duplicates.

02/27/07 13:33:36 changed by Gary Wilson <gary.wilson@gmail.com>

  • status changed from reopened to closed.
  • resolution set to duplicate.

ok, this seems to be a duplicate of #3168.


Add/Change #3181 ([patch] list_detail.object_list doesn't support custom querysets)




Change Properties
Action