Skip to content

Commit

Permalink
Do not show default plugins on /-/plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Aug 28, 2018
1 parent aae49fe commit 0bd41d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions datasette/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
to_css_class
)
from .inspect import inspect_hash, inspect_views, inspect_tables
from .plugins import pm
from .plugins import pm, DEFAULT_PLUGINS
from .version import __version__

app_root = Path(__file__).parent.parent
Expand Down Expand Up @@ -359,7 +359,7 @@ def plugins(self):
"templates": p["templates_path"] is not None,
"version": p.get("version"),
}
for p in get_plugins(pm)
for p in get_plugins(pm) if p["name"] not in DEFAULT_PLUGINS
]

async def execute(
Expand Down
4 changes: 2 additions & 2 deletions datasette/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pluggy
from . import hookspecs

default_plugins = (
DEFAULT_PLUGINS = (
"datasette.publish.heroku",
"datasette.publish.now",
)
Expand All @@ -12,6 +12,6 @@
pm.load_setuptools_entrypoints("datasette")

# Load default plugins
for plugin in default_plugins:
for plugin in DEFAULT_PLUGINS:
mod = importlib.import_module(plugin)
pm.register(mod, plugin)

0 comments on commit 0bd41d4

Please sign in to comment.