Permalink
Browse files

Misc. minor changes.

  • Loading branch information...
1 parent 85bf936 commit 000de5adb83ab3f63e8a23e71919f4db10ff9818 @rowyn rowyn committed Jan 8, 2012
Showing with 5 additions and 2 deletions.
  1. +4 −1 classshare/reviews/models.py
  2. +1 −1 classshare/templates/reviews/single_course.html
@@ -8,6 +8,9 @@
class Instructor(models.Model):
'''Model for a course instructor.'''
name = models.CharField(max_length=200)
+
+ class Meta:
+ ordering = ['name']
def __unicode__(self):
return self.name
@@ -55,7 +58,7 @@ def all_instructors(self):
'''Returns all the instructors that have ever taught the course'''
instructors = []
for the_class in self.class_set.all():
- if the_class.instructor not in instructors:
+ if the_class.instructor not in instructors and the_class.instructor is not None:
instructors.append(the_class.instructor)
return instructors
@@ -25,7 +25,7 @@
<span class="detail-label">{{ course.thumbs_count }} <img src="{{ STATIC_PREFIX }}img/Thumbs-up-icon.png" height="30" /></span>
</div>
-<h3>Reviews</h3>
+<h3>Reviews</h3><a href="{% url choose_class course.pk %}">Add review</a>
{% for class in course.class_set.all %}
{% for review in class.review_set.all %}
<div id="review-{{ review.pk }}" class="review">

0 comments on commit 000de5a

Please sign in to comment.