Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#32784 closed New feature (wontfix)

django.core.paginator.count should check for method arguments without defaults

Reported by: Christopher Dignam Owned by: nobody
Component: Core (Other) Version: 3.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The count method of the Django Paginator class should allow the QuerySet count method to have default arguments.

QuerySets with extra arguments will not error when called as long as they have defaults.

https://github.com/django/django/blob/7e51893911237dfca9294e3ca12163ff813fb656/django/core/paginator.py#L96

Change History (2)

comment:1 by Carlton Gibson, 4 years ago

Resolution: wontfix
Status: newclosed

The property here is intended to work with QuerySet.count (and anything that quacks like it). Adjusting that isn't going to be worth the complication.

The approach would be to subclass Paginator in your project to allow handling your custom count() (with arguments) variation.

comment:2 by Carlton Gibson, 4 years ago

Type: UncategorizedNew feature
Note: See TracTickets for help on using tickets.
Back to Top