Possible Duplicate:
How to get something random in datastore (AppEngine)?
I'm trying to get 20 random records from a current set of 200, which I'm assuming will grow to 20,000+ within the month. Using Python in Google AppEngine.
- It's for a iPhone API where a User can click "refresh" to get another random 20.
I've read a lot of answers, but none seem to either work correctly, or are random enough. Any help would be amazing.
My current code, just gets the latest 20.
items = ItemUser.all().filter('is_active =', True).order('-image_date').fetch(limit=2)
Some code examples would also be great as I'm still wrapping my head around Python, after coming from a solid Django background.