from markupsafe import Markup class matchSquadTable: def __init__(self, items): self.items = items self.border = True self.classes = [] def __html__(self): """Generate HTML table from items""" if not self.items: return Markup('
| Player Number | \n' html += 'Nickname | \n' html += 'Surname | \n' html += 'Forenames | \n' html += 'Actions | \n' html += '
|---|---|---|---|---|
| #{item.get("playernumber", "")} | \n' html += f'{item.get("playernickname", "")} | \n' html += f'{item.get("playersurname", "")} | \n' html += f'{item.get("playerforenames", "")} | \n' html += f'' html += f' | \n' html += '