From 6eed564bbba6277f8876093cc64d91920b82f541 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Wed, 17 Jul 2013 15:58:24 +0200 Subject: [PATCH] add course pull command --- .../commands/teleforma-pull-courses.py | 19 +++++++++++++++++++ 1 file changed, 19 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..a42bf60b --- /dev/null +++ b/teleforma/management/commands/teleforma-pull-courses.py @@ -0,0 +1,19 @@ +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' + + def handle(self, *args, **options): + view = CourseListView() + view.pull() -- 2.39.5