symposion_app/symposion/reviews/management/commands/assign_reviewers.py
Taavi Burns e180c7f00b Adds a manage.py script to assign reviewers to talks.
Requires that a 'reviewers' group exist, and that there are people assigned to it (otherwise it won't find any reviewers to add!).

It will assign up to 3 reviewers, where those reviewers are NOT one of the speakers, and that reviewer has not opted out of reviewing that talk. It will choose random reviewers from those with the fewest existing not-opted-out assignments.
2013-06-25 22:53:18 -04:00

17 lines
497 B
Python

import csv
import os
import random
from django.contrib.auth import models
from django.core.management.base import BaseCommand
from symposion.reviews.models import ReviewAssignment
from symposion.proposals.models import ProposalBase
class Command(BaseCommand):
def handle(self, *args, **options):
for proposal in ProposalBase.objects.filter(cancelled=0):
print "Creating assignments for %s" % (proposal.title,)
ReviewAssignment.create_assignments(proposal)