Skip to content
Extraits de code Groupes Projets
Valider 071cc2af rédigé par luxcem's avatar luxcem
Parcourir les fichiers

fixes commands

parent 51db7b11
Branches
Étiquettes
Aucune requête de fusion associée trouvée
import json
import urllib2
# from urllib2 import urlopen
from django.core.management.base import BaseCommand
from django.conf import settings
from representatives.utils import import_representatives_from_format
class Command(BaseCommand):
def handle(self, *args, **options):
if args and args[0] == 'q':
verbose = False
else:
verbose = True
compotista_server = getattr(settings,
'REPRESENTATIVES_COMPOTISTA_SERVER',
'http://compotista.mm.staz.be')
url = compotista_server + "/latest/"
import_representatives_from_format(
json.load(urllib2.urlopen(url)),
verbose=verbose)
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter