]> git.parisson.com Git - teleforma.git/commitdiff
add host kwarg to json conf pull
authorGuillaume Pellerin <yomguy@parisson.com>
Tue, 25 Jun 2013 15:05:50 +0000 (17:05 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Tue, 25 Jun 2013 15:05:50 +0000 (17:05 +0200)
teleforma/views/core.py

index 867097c3a3748a648ff67067e82bda3253613517..5756204e36c544fc89df76345e92680559ef8131 100644 (file)
@@ -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']: