From 28d564865292b56ba6296e854841b066c9b1fa39 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Sat, 21 Jul 2012 00:13:35 +0200 Subject: [PATCH] fix media published FIXME no audio --- teleforma/management/commands/teleforma-import-conferences.py | 2 +- teleforma/templates/teleforma/course_media.html | 3 ++- teleforma/templates/teleforma/inc/media_list.html | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/teleforma/management/commands/teleforma-import-conferences.py b/teleforma/management/commands/teleforma-import-conferences.py index ad2ff606..5ab374d0 100644 --- a/teleforma/management/commands/teleforma-import-conferences.py +++ b/teleforma/management/commands/teleforma-import-conferences.py @@ -72,8 +72,8 @@ class Command(BaseCommand): department, c = Department.objects.get_or_create(name=department_name, organization=organization) - if Conference.objects.filter(public_id=public_id): + print path conference = Conference.objects.get(public_id=public_id) conference.course = Course.objects.get(code=course_id) conference.course_type = CourseType.objects.get(name=course_type) diff --git a/teleforma/templates/teleforma/course_media.html b/teleforma/templates/teleforma/course_media.html index 77d1b05a..72d5095a 100644 --- a/teleforma/templates/teleforma/course_media.html +++ b/teleforma/templates/teleforma/course_media.html @@ -61,7 +61,8 @@ $(document).ready(function(){ {% elif "audio" in media.item.mime_type %}
- +
{% endif %} diff --git a/teleforma/templates/teleforma/inc/media_list.html b/teleforma/templates/teleforma/inc/media_list.html index 92ed38b3..710f43ee 100644 --- a/teleforma/templates/teleforma/inc/media_list.html +++ b/teleforma/templates/teleforma/inc/media_list.html @@ -10,7 +10,7 @@ {% for media in course.media.all|from_course_type:type %} - {% if media.published or user.is_staff %} + {% if media.is_published or user.is_staff %} {% if media.type == 'webm' %}
@@ -44,4 +44,4 @@
-{% endif %} \ No newline at end of file +{% endif %} -- 2.39.5