From 8c7b1be293823ba713a51efb92b90d0b2127d560 Mon Sep 17 00:00:00 2001 From: yomguy Date: Mon, 25 Jun 2012 23:53:16 +0200 Subject: [PATCH] prepare telecaster inclusion --- example/settings.py | 3 +++ example/update_schema.sh | 1 + example/urls.py | 1 + .../teleforma/inc/conference_list.html | 6 +++-- teleforma/views.py | 25 +++++++++++++++++++ 5 files changed, 34 insertions(+), 2 deletions(-) diff --git a/example/settings.py b/example/settings.py index 15749e89..8c01e684 100644 --- a/example/settings.py +++ b/example/settings.py @@ -144,6 +144,7 @@ INSTALLED_APPS = ( 'timezones', 'jqchat', # 'follow', + 'telecaster', ) TEMPLATE_CONTEXT_PROCESSORS = ( @@ -181,3 +182,5 @@ DEFAULT_FROM_EMAIL = 'webmaster@parisson.com' POSTMAN_AUTO_MODERATE_AS=True #FILE_PROTECTION_METHOD = 'xsendfile' + +TELECASTER_CONF = '/etc/telecaster/telecaster.xml' diff --git a/example/update_schema.sh b/example/update_schema.sh index 93714a93..e0d592e6 100755 --- a/example/update_schema.sh +++ b/example/update_schema.sh @@ -2,5 +2,6 @@ ./manage.py schemamigration teleforma --auto ./manage.py schemamigration telemeta --auto +./manage.py schemamigration telecaster --auto ./manage.py migrate diff --git a/example/urls.py b/example/urls.py index b6ae6b3e..250c91a7 100644 --- a/example/urls.py +++ b/example/urls.py @@ -20,6 +20,7 @@ urlpatterns = patterns('', # TeleForma (r'^', include('teleforma.urls')), + (r'^telecaster/', include('telecaster.urls')), # Languages (r'^i18n/', include('django.conf.urls.i18n')), diff --git a/teleforma/templates/teleforma/inc/conference_list.html b/teleforma/templates/teleforma/inc/conference_list.html index e010c855..518f48ae 100644 --- a/teleforma/templates/teleforma/inc/conference_list.html +++ b/teleforma/templates/teleforma/inc/conference_list.html @@ -30,7 +30,8 @@ {% if stream.streaming %} - + --> {% endif %} {% else %} diff --git a/teleforma/views.py b/teleforma/views.py index 0c357580..ed1d016a 100755 --- a/teleforma/views.py +++ b/teleforma/views.py @@ -319,6 +319,31 @@ class ConferenceView(DetailView): def dispatch(self, *args, **kwargs): return super(ConferenceView, self).dispatch(*args, **kwargs) + +class ConferenceNewView(DetailView): + + model = Conference + template_name='teleforma/course_conference.html' + + def get_context_data(self, **kwargs): + context = super(ConferenceNewView, self).get_context_data(**kwargs) + context['all_courses'] = get_courses(self.request.user) + conference = Conference() + context['mime_type'] = 'video/webm' + context['course'] = conference.course + context['type'] = conference.course_type + context['notes'] = conference.notes.all().filter(author=self.request.user) + content_type = ContentType.objects.get(app_label="teleforma", model="conference") + context['room'] = get_room(name=conference.course.title, content_type=content_type, + id=conference.id) + context['livestream'] = conference.livestream.get().url + return context + + @method_decorator(login_required) + def dispatch(self, *args, **kwargs): + return super(ConferenceView, self).dispatch(*args, **kwargs) + + class UsersView(ListView): model = User -- 2.39.5