From 2f4a96e18d3cc217a15332b93c3bcd50aede13f5 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Thu, 27 Sep 2012 15:00:10 -0400 Subject: [PATCH] Use better random generation of shakespeare lines. (imported from commit f979a8476f6fd925b9041e15dd38a9c261341be9) --- zephyr/management/commands/populate_db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zephyr/management/commands/populate_db.py b/zephyr/management/commands/populate_db.py index 41948433a7..0d1b9c3e28 100644 --- a/zephyr/management/commands/populate_db.py +++ b/zephyr/management/commands/populate_db.py @@ -210,7 +210,7 @@ def send_zephyrs(data): from django.db import connection connection.close() texts = file("zephyr/management/commands/test_zephyrs.txt", "r").readlines() - offset = 0 + offset = random.randint(0, len(texts)) recipient_classes = [klass.id for klass in Recipient.objects.filter(type=Recipient.CLASS)]