Skip to content

Commit

Permalink
update: use config_schema signal
Browse files Browse the repository at this point in the history
  • Loading branch information
mutantsan committed Apr 24, 2024
1 parent 9d1d37d commit 60a5c71
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ you need to set a smaller value.

## Requirements

* CKAN>=2.9
* CKAN>=2.10
* python>=3.7

## Installation
Expand All @@ -31,7 +31,7 @@ To install ckanext-drupal-api:
pip install -e .
pip install -r requirements.txt

3. Add `drupal-api` to the `ckan.plugins` setting in your CKAN
3. Add `drupal_api` to the `ckan.plugins` setting in your CKAN
config file (by default the config file is located at
`/etc/ckan/default/ckan.ini`).

Expand Down
7 changes: 7 additions & 0 deletions ckanext/drupal_api/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ def get_signal_subscriptions(self) -> types.SignalMapping:
tk.signals.ckanext.signal("ap_main:collect_config_sections"): [
self.collect_config_sections_subs
],
tk.signals.ckanext.signal("ap_main:collect_config_schemas"): [
self.collect_config_schemas_subs
],
}

@staticmethod
Expand All @@ -51,6 +54,10 @@ def collect_config_sections_subs(sender: None):
],
}

@staticmethod
def collect_config_schemas_subs(sender: None):
return ["ckanext.drupal_api:config_schema.yaml"]


if tk.check_ckan_version("2.10"):
tk.blanket.config_declarations(DrupalApiPlugin)

0 comments on commit 60a5c71

Please sign in to comment.