On Sep 21, 10:08 pm, Jack Morgan <jackofseat...@gmail.com> wrote:
> 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, <delegb...@timbaobjects.com> 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 <jackofseat...@gmail.com>
> > Sender: django-users@googlegroups.com
> > Date: Wed, 21 Sep 2011 09:10:49
> > To: Django users<django-users@googlegroups.com>
> > Reply-To: django-users@googlegroups.com
> > 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 django-users@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscribe@googlegroups.com.
> > 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 django-users@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscribe@googlegroups.com.
> > 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 django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment