Complete refactor of TableView and table.html template #1518
Description
Split from #878. The current TableView
class is by far the most complex part of Datasette, and the most difficult to work on: https://github.com/simonw/datasette/blob/0.59.2/datasette/views/table.py
In #878 I started exploring a new pattern for building views. In doing so it became clear that TableView
is the first beast that I need to slay - if I can refactor that into something neat the pattern for building other views will emerge as a natural consequence.
I've been trying to build this as a register_routes()
plugin, as originally suggested in #870 - though unfortunately it looks like those plugins can't replace existing Datasette default views at the moment, see #1517. [UPDATE: I was wrong about this, plugins can over-ride default views just fine]
I also know that I want to have a fully documented template context for table.html
as a major step on the way to Datasette 1.0, see #1510.
All of this adds up to the TableView
factor being a major project that will unblock a whole flurry of other things - so I'm going to work on that in this separate issue.