From: Guillaume Pellerin Date: Tue, 17 Sep 2013 16:29:56 +0000 (+0200) Subject: fix course pull command X-Git-Tag: 1.1~509 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=57256ab91e6b7bc93af1ffbbe80e4c511cb7eeac;p=teleforma.git fix course pull command Conflicts: 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)