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

[enh] export mandates

parent 2d4666f8
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -35,6 +35,18 @@ class Command(BaseCommand):
"phones": [phone.id for phone in address.phone_set.all()],
} for address in representative.address_set.all()]
reps["mandates"] = [{
"name": mandate.name,
"type": mandate.kind,
"short_id": mandate.short_id,
"url_official": mandate.url,
"constituency": mandate.constituency,
"role": mandate.role,
"begin_date": mandate.begin_date.strftime("%F") if mandate.begin_date else None,
"end_date": mandate.end_date.strftime("%F") if mandate.end_date else None,
"current": mandate.active,
} for mandate in representative.mandate_set.all()]
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