From 2e57a2005633e679b761dde830a1c933532f9f61 Mon Sep 17 00:00:00 2001 From: Charles Connell Date: Mon, 14 Apr 2014 17:05:20 -0400 Subject: [PATCH] Professor name is effectively required, so might as well say so. Also fix how professor are shown --- karmaworld/apps/courses/forms.py | 4 ++-- karmaworld/templates/courses/course_detail.html | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/karmaworld/apps/courses/forms.py b/karmaworld/apps/courses/forms.py index d15bcda..4cfb445 100644 --- a/karmaworld/apps/courses/forms.py +++ b/karmaworld/apps/courses/forms.py @@ -34,9 +34,9 @@ class ProfessorForm(NiceErrorModelForm, ACFieldModelForm): # first argument is ajax channel name, defined in models as LookupChannel. name = AutoCompleteSelectField('professor_object_by_name', help_text='', - label="Professor's name", + label=mark_safe('Professor\'s name (required)'), # allows creating a new Professor on the fly - required=False, + required=True, widget=AutoCompleteSelectWidget('professor_object_by_name', attrs={'class': 'small-6 columns'})) email = AutoCompleteSelectField('professor_object_by_email', help_text='', label="Professor's email address", diff --git a/karmaworld/templates/courses/course_detail.html b/karmaworld/templates/courses/course_detail.html index f513b26..c00fec2 100644 --- a/karmaworld/templates/courses/course_detail.html +++ b/karmaworld/templates/courses/course_detail.html @@ -44,7 +44,11 @@ {% if course.instructor_name %} {{ course.instructor_name }} {% else %} - {{ course.instructor.name }} + + {% for prof in course.professor.all %} + {{ prof.name }}{% if not forloop.last %},{% endif %} + {% endfor %} + {% endif %} -- 2.25.1