From 50c34596e30fe51175ec172b6e3a40e6e7284c59 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Thu, 11 Jul 2013 23:29:30 +0200 Subject: [PATCH] add push/pull commands for confs anf profs --- .../commands/teleforma-pull-conferences.py | 20 +++++++++++++++++++ .../commands/teleforma-pull-professors.py | 19 ++++++++++++++++++ .../commands/teleforma-push-conferences.py | 20 +++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 teleforma/management/commands/teleforma-pull-conferences.py create mode 100644 teleforma/management/commands/teleforma-pull-professors.py create mode 100644 teleforma/management/commands/teleforma-push-conferences.py diff --git a/teleforma/management/commands/teleforma-pull-conferences.py b/teleforma/management/commands/teleforma-pull-conferences.py new file mode 100644 index 00000000..8762da53 --- /dev/null +++ b/teleforma/management/commands/teleforma-pull-conferences.py @@ -0,0 +1,20 @@ +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 conferences from a remote host" + args = "host" + admin_email = 'webmaster@parisson.com' + + def handle(self, *args, **options): + view = ConferenceListView() + view.pull() diff --git a/teleforma/management/commands/teleforma-pull-professors.py b/teleforma/management/commands/teleforma-pull-professors.py new file mode 100644 index 00000000..b7ad0d63 --- /dev/null +++ b/teleforma/management/commands/teleforma-pull-professors.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 conferences from a telecaster master server" + admin_email = 'webmaster@parisson.com' + + def handle(self, *args, **options): + view = ProfessorListView() + view.pull() diff --git a/teleforma/management/commands/teleforma-push-conferences.py b/teleforma/management/commands/teleforma-push-conferences.py new file mode 100644 index 00000000..016af79a --- /dev/null +++ b/teleforma/management/commands/teleforma-push-conferences.py @@ -0,0 +1,20 @@ +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 conferences from a remote host" + args = "host" + admin_email = 'webmaster@parisson.com' + + def handle(self, *args, **options): + view = ConferenceListView() + view.push() -- 2.39.5