Code

Opened 7 years ago

Closed 7 years ago

#3181 closed enhancement (duplicate)

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

Reported by: arockstar@… Owned by: jacob
Component: Generic views Version:
Severity: minor Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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 (2)

list_detail.patch.txt (1019 bytes) - added by arockstar@… 7 years ago.
Patch for list_detail
list_detail.patch (1019 bytes) - added by anonymous 7 years ago.
Patch for list_detail

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by arockstar@…

Patch for list_detail

Changed 7 years ago by anonymous

Patch for list_detail

comment:1 Changed 7 years ago by arockstar@…

  • Resolution set to fixed
  • Status changed from new to closed
  • 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.

comment:2 Changed 7 years ago by arockstar@…

  • Resolution fixed deleted
  • Status changed from closed to reopened

Ug. Sorry. Wrong fields checked by accident

comment:3 Changed 7 years ago by anonymous

  • Resolution set to duplicate
  • Status changed from reopened to closed

comment:4 Changed 7 years ago by Gary Wilson <gary.wilson@…>

  • Resolution duplicate deleted
  • Status changed from closed to reopened

Please specify the ticket this duplicates.

comment:5 Changed 7 years ago by Gary Wilson <gary.wilson@…>

  • Resolution set to duplicate
  • Status changed from reopened to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.