mirror of
https://github.com/simonw/datasette.git
synced 2026-06-06 00:56:57 +02:00
New plugin hook for customizing the way cells values are rendered in HTML. The first full example of this hook in use is https://github.com/simonw/datasette-json-html
17 lines
377 B
Python
17 lines
377 B
Python
import importlib
|
|
import pluggy
|
|
from . import hookspecs
|
|
|
|
default_plugins = (
|
|
"datasette.publish.heroku",
|
|
"datasette.publish.now",
|
|
)
|
|
|
|
pm = pluggy.PluginManager("datasette")
|
|
pm.add_hookspecs(hookspecs)
|
|
pm.load_setuptools_entrypoints("datasette")
|
|
|
|
# Load default plugins
|
|
for plugin in default_plugins:
|
|
mod = importlib.import_module(plugin)
|
|
pm.register(mod, plugin)
|