From: Charles Connell Date: Mon, 14 Apr 2014 21:05:20 +0000 (-0400) Subject: Professor name is effectively required, so might as well say so. Also fix how profess... X-Git-Tag: release-20150131~142 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2e57a2005633e679b761dde830a1c933532f9f61;p=oweals%2Fkarmaworld.git Professor name is effectively required, so might as well say so. Also fix how professor are shown --- 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 %}