Opened 9 years ago

Closed 9 years ago

#2394 closed defect (wontfix)

count() QuerySet method should accept lookup parameters

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

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 Changed 9 years ago by adrian

  • Resolution set to wontfix
  • Status changed from new to closed

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