]> git.parisson.com Git - teleforma.git/commitdiff
fix no prof, fix course list
authorGuillaume Pellerin <yomguy@parisson.com>
Tue, 12 Nov 2013 16:21:30 +0000 (17:21 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Tue, 12 Nov 2013 16:23:53 +0000 (17:23 +0100)
Conflicts:
teleforma/views/core.py

teleforma/templates/teleforma/inc/conference_list.html
teleforma/views/core.py

index 753fcea1e1cbcc5515f2cbdf8299bf145195808f..76e97b1a396044f3c9900c3350d8221437f8a293 100644 (file)
@@ -24,7 +24,9 @@
                     <dl class="listing" style="font-size: 1.2em;">
                     <dt>{% trans "Title" %}</dt><dd>{{ stream.conference.course.title }}</dd>
                     <dt>{% trans "Session" %}</dt><dd>{{ stream.conference.session }}</dd>
+                    {% if stream.conference.professor.user.username %}
                     <dt>{% trans "Professor" %}</dt><dd><a href="{% url telemeta-profile-detail stream.conference.professor.user.username %}" target="_blank">{{ stream.conference.professor }}</a></dd>
+                    {% endif %}
                     <dt>{% trans "Begin" %}</dt><dd>{{ stream.conference.date_begin }}</dd>
                     </dl>
                  </div>
@@ -48,4 +50,4 @@
     </table>
 </div>
 {% endif %}
-{% endwith %}
\ No newline at end of file
+{% endwith %}
index 23ccc35d7bd27fa69d9bd06bbeaabf8d19644d8d..73bfe58276ae68ebf4198cb16e024a9addf47e39 100644 (file)
@@ -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):