Opened 18 years ago

Closed 18 years ago

#2394 closed defect (wontfix)

count() QuerySet method should accept lookup parameters

Reported by: Gary Wilson <gary.wilson@…> Owned by: Adrian Holovaty
Component: Database layer (models, ORM) Version: dev
Severity: normal Keywords:
Cc: gary.wilson@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When lookup parameters are passed to count(), count() should do an implied filter().

For example, the following should be identical:

User.objects.filter(pk=1).count()
User.objects.count(pk=1)

Change History (1)

comment:1 by Adrian Holovaty, 18 years ago

Resolution: wontfix
Status: newclosed

I'm -0 on this, because it introduces more than one way to do the same thing.

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