mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 14:44:29 -04:00
rename plugins_sys base to config
This commit is contained in:
parent
e8f1264954
commit
2d19317e3f
4 changed files with 6 additions and 6 deletions
|
@ -84,7 +84,7 @@ class BasePlugin(BaseModel):
|
||||||
# preserve references to original default objects,
|
# preserve references to original default objects,
|
||||||
# pydantic deepcopies them by default which breaks mutability
|
# pydantic deepcopies them by default which breaks mutability
|
||||||
# see https://github.com/pydantic/pydantic/issues/7608
|
# see https://github.com/pydantic/pydantic/issues/7608
|
||||||
# if we dont do this, then plugins_sys.base.CORE_CONFIG != settings.CONFIGS.CoreConfig for example
|
# if we dont do this, then plugins_extractor.SINGLEFILE_CONFIG != settings.CONFIGS.SingleFileConfig for example
|
||||||
# and calling .__init__() on one of them will not update the other
|
# and calling .__init__() on one of them will not update the other
|
||||||
self.hooks = self.model_fields['hooks'].default
|
self.hooks = self.model_fields['hooks'].default
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ from plugantic.base_queue import BaseQueue
|
||||||
from plugantic.base_hook import BaseHook
|
from plugantic.base_hook import BaseHook
|
||||||
|
|
||||||
# Depends on Other Plugins:
|
# Depends on Other Plugins:
|
||||||
from plugins_sys.base.apps import ARCHIVING_CONFIG
|
from plugins_sys.config.apps import ARCHIVING_CONFIG
|
||||||
from plugins_pkg.npm.apps import SYS_NPM_BINPROVIDER, LIB_NPM_BINPROVIDER
|
from plugins_pkg.npm.apps import SYS_NPM_BINPROVIDER, LIB_NPM_BINPROVIDER
|
||||||
|
|
||||||
###################### Config ##########################
|
###################### Config ##########################
|
||||||
|
|
|
@ -123,9 +123,9 @@ class SearchBackendConfig(BaseConfigSet):
|
||||||
SEARCH_BACKEND_CONFIG = SearchBackendConfig()
|
SEARCH_BACKEND_CONFIG = SearchBackendConfig()
|
||||||
|
|
||||||
|
|
||||||
class CorePlugin(BasePlugin):
|
class ConfigPlugin(BasePlugin):
|
||||||
app_label: str = 'core'
|
app_label: str = 'config'
|
||||||
verbose_name: str = 'Core'
|
verbose_name: str = 'Configuration'
|
||||||
|
|
||||||
hooks: List[InstanceOf[BaseHook]] = [
|
hooks: List[InstanceOf[BaseHook]] = [
|
||||||
SHELL_CONFIG,
|
SHELL_CONFIG,
|
||||||
|
@ -137,6 +137,6 @@ class CorePlugin(BasePlugin):
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
PLUGIN = CorePlugin()
|
PLUGIN = ConfigPlugin()
|
||||||
PLUGIN.register(settings)
|
PLUGIN.register(settings)
|
||||||
DJANGO_APP = PLUGIN.AppConfig
|
DJANGO_APP = PLUGIN.AppConfig
|
Loading…
Add table
Add a link
Reference in a new issue