]> git.parisson.com Git - teleforma.git/commitdiff
fix push confs
authoryomguy <yomguy@parisson.com>
Fri, 27 Sep 2013 06:13:48 +0000 (08:13 +0200)
committeryomguy <yomguy@parisson.com>
Fri, 27 Sep 2013 06:13:48 +0000 (08:13 +0200)
teleforma/management/commands/teleforma-push-conferences.py
teleforma/views/core.py

index 016af79a11b2128dd7a1f5ae48f898dc2e216873..0f9184d204433bb74a1e1956203465d3b487d9a5 100644 (file)
@@ -12,9 +12,10 @@ import codecs
 
 class Command(BaseCommand):
     help = "pull teleforma conferences from a remote host"
-    args = "host"
     admin_email = 'webmaster@parisson.com'
 
     def handle(self, *args, **options):
+        organization_name = args[-2]
+        department_name = args[-1]
         view = ConferenceListView()
-        view.push()
+        view.push(organization_name, department_name)
index 918f2a14ebf9ad6b885de540505d019933f73721..c0d9b7559c998872cfa03b767c0b5233fee89a70 100644 (file)
@@ -507,7 +507,8 @@ class ConferenceListView(View):
                     conference.from_json_dict(conf_dict)
 
     def push(request, organization_name, department_name):
-        organization = organization.objects.get(name=organization_name)
+        from teleforma.models import Organization, Department
+        organization = Organization.objects.get(name=organization_name)
         department = Department.objects.get(name=department_name, organization=organization)
         url = 'http://' + department.domain + '/json/'
         s = ServiceProxy(url)