Hi, thanks! The issue I'm getting here is that the RawQuerySet object does not have the .count() method so it just gives an error. I also just checked that it does not have the 'all()' method either.
On Wed, Sep 21, 2011 at 9:23 AM, <[email protected]> wrote: > Let's say you have a model Utility, you can do > Utility.objects.all().count() > Hope that helps. > Regards. > Sent from my BlackBerry wireless device from MTN > > -----Original Message----- > From: Jack <[email protected]> > Sender: [email protected] > Date: Wed, 21 Sep 2011 09:10:49 > To: Django users<[email protected]> > Reply-To: [email protected] > Subject: Getting a count of a RawQuerySet object > > Hello everyone, I'm quite new to django and python in general so I'm > sure there's just something I missed in my searching to answer this. > But... > > Is there a way to count the number of results returned in the > RawQuerySet option? > > I've tried the len() function and I've search the django documentation > with no results. So, any help would be very welcomed. > > Thanks! > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

