﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
30118	Add support for filter arguments in queryset.exists() and queryset.count()	Sjoerd Job Postmus	nobody	"Currently, both .exists() and .count() do not support any arguments.

I would very much enjoy being able to write

{{{
if SomeModel.objects.exists(field=value):
}}}

instead of

{{{
if SomeModel.objects.filter(field=value).exists():
}}}

and similarly for count.

Especially when the ""search"" part of the query is more complex, it would allow one to write

{{{
number_of_superusers_in_group = User.objects.count(
    is_superuser=True,
    group=group,
)
}}}

which I find visually more appealing over

{{{
number_of_superusers_in_group = User.objects.filter(
    is_superuser=True,
    group=group,
).count()
}}}

because of the strange ""method-call"" on the last line.

As it seems fairly obvious to me, and also fairly simple to implement, I suspect there might be something I'm missing as to why it's not a good idea, and it might already have been documented, but I can not find it."	New feature	closed	Database layer (models, ORM)	dev	Normal	wontfix			Unreviewed	1	0	0	0	0	0
