mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
register_commands() plugin hook, closes #1449
This commit is contained in:
parent
3655bb49a4
commit
30c18576d6
4 changed files with 109 additions and 1 deletions
|
|
@ -79,6 +79,11 @@ def register_routes(datasette):
|
|||
"""Register URL routes: return a list of (regex, view_function) pairs"""
|
||||
|
||||
|
||||
@hookspec
|
||||
def register_commands(cli):
|
||||
"""Register additional CLI commands, e.g. 'datasette mycommand ...'"""
|
||||
|
||||
|
||||
@hookspec
|
||||
def actor_from_request(datasette, request):
|
||||
"""Return an actor dictionary based on the incoming request"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue