Commit 3cabf7cf authored by Bram's avatar Bram
Browse files

[enh] first version of export_in_representatives_format command

parent 931ec572
import json
from representatives.models import Representative
from django.core.management.base import BaseCommand
class Command(BaseCommand):
args = '<poll_id poll_id ...>'
help = 'Closes the specified poll for voting'
def handle(self, *args, **options):
result = []
for representative in Representative.objects.all():
reps = {"id": representative.remote_id}
result.append(reps)
print json.dumps(result, indent=4)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment