From: Guillaume Pellerin Date: Tue, 25 Jun 2013 15:05:50 +0000 (+0200) Subject: add host kwarg to json conf pull X-Git-Tag: 1.1~608 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=8383ad4a9bbb7fe83ef46e370d30baefa25a8360;p=teleforma.git add host kwarg to json conf pull --- diff --git a/teleforma/views/core.py b/teleforma/views/core.py index 867097c3..5756204e 100644 --- a/teleforma/views/core.py +++ b/teleforma/views/core.py @@ -408,8 +408,12 @@ class ConferenceListView(ListView): conferences = Conference.objects.all() return [c.to_json_dict() for c in conferences] - def pull(request): - url = 'http://' + settings.TELECASTER_MASTER_SERVER + '/json/' + def pull(request, host=None): + if host: + url = 'http://' + host + '/json/' + else: + url = 'http://' + settings.TELECASTER_MASTER_SERVER + '/json/' + s = ServiceProxy(url) result = s.teleforma.get_conference_list() for conf_dict in result['result']: