Skip to content
Extraits de code Groupes Projets
Valider 3cabf7cf rédigé par Bram's avatar Bram
Parcourir les fichiers

[enh] first version of export_in_representatives_format command

parent 931ec572
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Fichier ajouté
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)
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter