From: Guillaume Pellerin Date: Tue, 12 Nov 2013 16:21:30 +0000 (+0100) Subject: fix no prof, fix course list X-Git-Tag: 1.1~502^2 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=b6145f26fefc9ce451a84bd94df649593a9b825a;p=teleforma.git fix no prof, fix course list Conflicts: teleforma/views/core.py --- 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 23ccc35d..73bfe582 100644 --- a/teleforma/views/core.py +++ b/teleforma/views/core.py @@ -239,9 +239,9 @@ class CourseListView(CourseAccessMixin, ListView): return super(CourseListView, self).dispatch(*args, **kwargs) @jsonrpc_method('teleforma.get_course_list') - def get_course_list(request, organization_name, department_name): - organization = Organization.objects.get(name=organization_name) - department = Department.objects.get(organization=organization, name=department_name) + 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):