Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

The extension gives you ability to pull random records using Django's ORM.

Project Description

The extension gives you ability to pull random records using Django’s ORM.


Python 2.7, 3.2, 3.3, 3.4, Django 1.5+.


$ pip install django-random-queryset


Add RandomManager to desired model:

from django.db import models

from django_random_queryset import RandomManager

class Model(models.Model):

    objects = RandomManager()

    # ...

Use it:

queryset = Model.objects.filter(field=value)
queryset.random()   # to get one random record
queryset.random(5)  # pass amount to get more records
queryset.random().values()  # other queryset methods available

Release History

This version
History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(3.8 kB) Copy SHA256 Hash SHA256
Source May 16, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting