Adding reasoning for adding a new metadata field

This commit is contained in:
Arjun Singh
2012-08-22 05:00:11 -07:00
parent 0b6bf77373
commit 9a21c5d4a8

View File

@@ -197,6 +197,10 @@ class CourseDescriptor(SequenceDescriptor):
def start_date_text(self):
return time.strftime("%b %d, %Y", self.start)
# An extra property is used rather than the wiki_slug/number because
# there are courses that change the number for different runs. This allows
# courses to share the same css_class across runs even if they have
# different numbers.
@property
def css_class(self):
return self.metadata.get('css_class', '')