]> git.parisson.com Git - teleforma.git/commitdiff
fix course pull command
authorGuillaume Pellerin <yomguy@parisson.com>
Tue, 17 Sep 2013 16:29:56 +0000 (18:29 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Tue, 17 Sep 2013 16:34:57 +0000 (18:34 +0200)
Conflicts:
teleforma/management/commands/teleforma-pull-courses.py

teleforma/management/commands/teleforma-pull-courses.py [new file with mode: 0644]

diff --git a/teleforma/management/commands/teleforma-pull-courses.py b/teleforma/management/commands/teleforma-pull-courses.py
new file mode 100644 (file)
index 0000000..2360b02
--- /dev/null
@@ -0,0 +1,23 @@
+from optparse import make_option
+from django.conf import settings
+from django.core.management.base import BaseCommand, CommandError
+from django.contrib.auth.models import User
+from django.template.defaultfilters import slugify
+from telemeta.models import *
+from telemeta.util.unaccent import unaccent
+from teleforma.models import *
+from teleforma.views import *
+import logging
+import codecs
+
+
+class Command(BaseCommand):
+    help = "pull teleforma courses from a remote host"
+    admin_email = 'webmaster@parisson.com'
+    args = "organization_name department_name"
+
+    def handle(self, *args, **options):
+       organization_name = args[0]
+       department_name = args[1]
+        view = CourseListView()
+        view.pull(organization_name, department_name)