Re: How to return Random items from a Mongodb Resource

2014-02-24 Thread Camilo Torres
On Monday, February 24, 2014 8:28:23 AM UTC-4:30, Anuj Chauhan wrote: > > Hi Friends, > > I need to return random items from a tastypie resource which is > a resources.MongoEngineResource. > > I have already tried using MyClass.objects.all().order_by('?'), but it > simply keep returning the same

How to return Random items from a Mongodb Resource

2014-02-24 Thread Anuj Chauhan
Hi Friends, I need to return random items from a tastypie resource which is a resources.MongoEngineResource. I have already tried using MyClass.objects.all().order_by('?'), but it simply keep returning the same rows always. Following is the code of my resource. class MViewSubResponseRandomRes