added sorting to deliverables output

This commit is contained in:
Jesse Cirimelli-Low 2019-03-06 21:12:21 -08:00
parent fac9ff9be6
commit 83e810f8b8
2 changed files with 3 additions and 0 deletions

View File

@ -78,4 +78,5 @@ class datasheet():
self.html += self.corners_table.to_html(comments)
# display deliverables table
self.html += '<p style="font-size: 26px;font-family: Trebuchet MS, Arial, Helvetica, sans-serif;">Deliverables</p>'
self.dlv_table.sort()
self.html += self.dlv_table.to_html(comments)

View File

@ -45,6 +45,8 @@ class table_gen:
html += '</tr>'
html += '</tbody>'
return html
def sort(self):
self.rows[1:] = sorted(self.rows[1:], key=lambda x : x[0])
def to_html(self,comments):
"""writes table_gen object to inline html"""