From 8383ad4a9bbb7fe83ef46e370d30baefa25a8360 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Tue, 25 Jun 2013 17:05:50 +0200 Subject: [PATCH] add host kwarg to json conf pull --- teleforma/views/core.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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']: -- 2.39.5