summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-01-13 16:37:08 -0300
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-01-13 16:37:08 -0300
commitb6ba1415689a034c320aa1ad3952878ad42d3f93 (patch)
tree17490adc259150f26b0f7b1ff9a6bc7f44c14b54
parent4b3bc55042499ca9096c4d1ed4a65ad36cd74868 (diff)
downloadaskbot-b6ba1415689a034c320aa1ad3952878ad42d3f93.tar.gz
askbot-b6ba1415689a034c320aa1ad3952878ad42d3f93.tar.bz2
askbot-b6ba1415689a034c320aa1ad3952878ad42d3f93.zip
added one tag to half of posted questions in the askbot_add_test_content management command
-rw-r--r--askbot/management/commands/askbot_add_test_content.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/askbot/management/commands/askbot_add_test_content.py b/askbot/management/commands/askbot_add_test_content.py
index 7295e1de..6b14df59 100644
--- a/askbot/management/commands/askbot_add_test_content.py
+++ b/askbot/management/commands/askbot_add_test_content.py
@@ -76,7 +76,8 @@ class Command(NoArgsCommand):
active_question = None
last_vote = False
# Each user posts a question
- for user in users[:NUM_QUESTIONS]:
+ for i in range(NUM_QUESTIONS):
+ user = users[i]
# Downvote/upvote the questions - It's reproducible, yet
# gives good randomized data
if not active_question is None:
@@ -94,6 +95,8 @@ class Command(NoArgsCommand):
# len(TAGS_TEMPLATE) tags per question - each tag is different
tags = " ".join([t%user.id for t in TAGS_TEMPLATE])
+ if i < NUM_QUESTIONS/2:
+ tags += ' one-tag'
active_question = user.post_question(
title = TITLE_TEMPLATE % user.id,
body_text = CONTENT_TEMPLATE,