class NavSection: def __init__(self, name, order=100): self.name = name self.order = order self.items = [] def add_item(self, item): self.items.append(item) def get_html(self, active=None): html = f"""
""" self.items.sort(key=lambda x: x.order) for item in self.items: html += """