From bcd6dc58ab1374dc59f79e63c466cd78fc34cb81 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Tue, 12 Nov 2013 17:21:30 +0100 Subject: [PATCH] fix no prof, fix course list --- teleforma/templates/teleforma/inc/conference_list.html | 4 +++- teleforma/views/core.py | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/teleforma/templates/teleforma/inc/conference_list.html b/teleforma/templates/teleforma/inc/conference_list.html index 753fcea1..76e97b1a 100644 --- a/teleforma/templates/teleforma/inc/conference_list.html +++ b/teleforma/templates/teleforma/inc/conference_list.html @@ -24,7 +24,9 @@
{% trans "Title" %}
{{ stream.conference.course.title }}
{% trans "Session" %}
{{ stream.conference.session }}
+ {% if stream.conference.professor.user.username %}
{% trans "Professor" %}
{{ stream.conference.professor }}
+ {% endif %}
{% trans "Begin" %}
{{ stream.conference.date_begin }}
@@ -48,4 +50,4 @@ {% endif %} -{% endwith %} \ No newline at end of file +{% endwith %} diff --git a/teleforma/views/core.py b/teleforma/views/core.py index cdf15472..21868392 100644 --- a/teleforma/views/core.py +++ b/teleforma/views/core.py @@ -232,8 +232,9 @@ class CourseListView(CourseAccessMixin, ListView): return super(CourseListView, self).dispatch(*args, **kwargs) @jsonrpc_method('teleforma.get_course_list') - def get_course_list(request, department_id): - department = Department.objects.get(id=department_id) + def get_course_list(request, department_name): + from teleforma.models import Department + department = Department.objects.get(name=department_name) return [course.to_dict() for course in Course.objects.filter(department=department)] def pull(request, organization_name, department_name): -- 2.39.5