mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Return plugins and hooks in predictable order
This commit is contained in:
parent
43c30ce023
commit
e1770766ce
3 changed files with 23 additions and 24 deletions
|
|
@ -764,13 +764,14 @@ class Datasette:
|
|||
should_show_all = all
|
||||
if not should_show_all:
|
||||
ps = [p for p in ps if p["name"] not in DEFAULT_PLUGINS]
|
||||
ps.sort(key=lambda p: p["name"])
|
||||
return [
|
||||
{
|
||||
"name": p["name"],
|
||||
"static": p["static_path"] is not None,
|
||||
"templates": p["templates_path"] is not None,
|
||||
"version": p.get("version"),
|
||||
"hooks": list(set(p["hooks"])),
|
||||
"hooks": list(sorted(set(p["hooks"]))),
|
||||
}
|
||||
for p in ps
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue