mirror of
https://github.com/simonw/datasette.git
synced 2026-06-10 19:16:57 +02:00
Refactor ColumnType: register classes, return instances with config
- register_column_types() now returns classes instead of instances
- ColumnType.__init__ takes optional config=, baking it into the instance
- get_column_type() returns a ColumnType instance (or None) instead of a
(name, config) tuple
- get_column_types() returns {col: ColumnType instance} instead of tuples
- Remove get_column_type_class() - no longer needed
- render_cell/validate/transform_value methods no longer take config arg;
use self.config instead
- render_cell hook takes column_type (ColumnType or None) instead of
column_type + column_type_config
https://claude.ai/code/session_01SvPEPqHgURTWESRp28pTC3
This commit is contained in:
parent
8af98c24c2
commit
dd9b83301c
11 changed files with 227 additions and 243 deletions
|
|
@ -65,7 +65,6 @@ def render_cell(
|
|||
datasette,
|
||||
request,
|
||||
column_type,
|
||||
column_type_config,
|
||||
):
|
||||
"""Customize rendering of HTML table cell values"""
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue