split plugin dirs, created new cleaner import path for plugin config in settings.py

This commit is contained in:
Nick Sweeting 2024-09-24 01:25:55 -07:00
parent 1a58967e8c
commit a9a97c013d
No known key found for this signature in database
39 changed files with 469 additions and 199 deletions

View file

@ -42,7 +42,11 @@ class BaseBinProvider(BaseHook, BinProvider):
settings.BINPROVIDERS[self.id] = self
super().register(settings, parent_plugin=parent_plugin)
@property
def admin_url(self) -> str:
# e.g. /admin/environment/binproviders/NpmBinProvider/ TODO
return "/admin/environment/binaries/"
class BaseBinary(BaseHook, Binary):
@ -87,6 +91,11 @@ class BaseBinary(BaseHook, Binary):
binary = super().load_or_install(**kwargs)
self.symlink_to_lib(binary=binary, bin_dir=settings.CONFIG.BIN_DIR)
return binary
@property
def admin_url(self) -> str:
# e.g. /admin/environment/config/LdapConfig/
return f"/admin/environment/binaries/{self.name}/"
apt = AptProvider()
brew = BrewProvider()