add string to model class unicode

This commit is contained in:
ichuang
2012-09-04 10:25:28 -04:00
parent 520d5620d0
commit 258274f2a7
2 changed files with 7 additions and 1 deletions

View File

@@ -187,7 +187,7 @@ class CourseEnrollment(models.Model):
unique_together = (('user', 'course_id'), )
def __unicode__(self):
return "%s: %s (%s)" % (self.user, self.course_id, self.created)
return "[CourseEnrollment] %s: %s (%s)" % (self.user, self.course_id, self.created)
@receiver(post_save, sender=CourseEnrollment)

View File

@@ -19,6 +19,12 @@
<section class="container">
## I'm removing this for now since we aren't using it for the fall.
## <%include file="course_filter.html" />
<%!
from django.core.urlresolvers import reverse
%>
<h1>For 8.01 Reading Questions, click on <a href="${reverse('courses')}">Find Courses</a></h1>
<section class="courses">
<section class='university-column'>
%for course in universities['MITx']: