Re: Extending count()

2006-03-02 Thread Rock
Russell Keith-Magee posted this in a separate thread: > Article.objects.all().count() reads quite obviously as the count of > all articles. However, Article.objects.all().count('title') reads (to > me) like an inelegant way of saying 'a count of all titles'. This > isn't what your proposal would r

Extending count()

2006-03-01 Thread Rock
I have been sprinting this week with Jacob and others at PyCon. Here is a small change that I am about to check in that extends the count() function: count(self,fieldname="*") This change in query.py as well as the corresponding funcion in manager.py extend the count() function. In the default