From 57256ab91e6b7bc93af1ffbbe80e4c511cb7eeac Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Tue, 17 Sep 2013 18:29:56 +0200 Subject: [PATCH] fix course pull command Conflicts: teleforma/management/commands/teleforma-pull-courses.py --- .../commands/teleforma-pull-courses.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 teleforma/management/commands/teleforma-pull-courses.py diff --git a/teleforma/management/commands/teleforma-pull-courses.py b/teleforma/management/commands/teleforma-pull-courses.py new file mode 100644 index 00000000..2360b02b --- /dev/null +++ b/teleforma/management/commands/teleforma-pull-courses.py @@ -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) -- 2.39.5