def navbarItems(activePage): pages = ["Students", "Assistants", "Experiments", "Appointments", "Groups", "Users"] items = "" for page in pages: active = "" lowerPage = page.lower().replace(" ", "_") if lowerPage == activePage: active = " active" items += '' + page + '' return items def makeTable(headerAndDataList, rows): def cellString(cell): cell = str(cell) excludeChars = """<>"'[]""" for c in excludeChars: if c in cell: cell = cell.replace(c, "") return cell def td(cell): return "" + cellString(cell) + "" def th(cell): return '' + cellString(cell) + '' table = '''''' for i in headerAndDataList: table += th(i[0]) table += '''\n''' for row in rows: table += '' for i in headerAndDataList: table += td(eval(i[1])) table += '\n' table += '''



''' return table def appointmentDate(date): return date.strftime("%a %d.%m.%Y")