Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

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

Project details

Release history Release notifications

This version
History Node


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.

Filename, size & hash SHA256 hash help File type Python version Upload date
django-random-queryset-0.0.4.tar.gz (3.8 kB) Copy SHA256 hash SHA256 Source None Feb 25, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page