Build a web application purely in Python, in terms of useful objects that shield you from low-level web implementation issues.
Pages are Widgets, composed of other Widgets.
class MyPage(HTML5Page): def __init__(self, view): super(MyPage, self).__init__(view) paragraph = P(view, text='Hello') self.body.add_child(paragraph)
Complex Widgets include looks and rich behaviour (client and server-side).
Name | Capital |
---|---|
Equatorial Guinea | Malabo |
Eritrea | Asmara |
Ethiopia | Addis Ababa |
by_name = lambda i: i.name columns = [ StaticColumn(Field(label='Name'), 'name', sort_key=by_name), StaticColumn(Field(label='Capital'), 'capital') ] layout = TableLayout(striped=True, heading_theme='light', highlight_hovered=True, border='cells') data_table = DataTable(self.view, columns, countries, 'country_table', items_per_page=3, table_layout=layout) example_panel.add_child(data_table)