Skip to content

Commit

Permalink
📝 Add docs for NotificationConfigurationStep
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenbal committed Dec 6, 2024
1 parent d066fc8 commit 9647d84
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Features
:caption: Contents:

quickstart
setup_config


Indices and tables
Expand Down
40 changes: 40 additions & 0 deletions docs/setup_config.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Setup configuration
===================

Loading notification configuration from a YAML file
***************************************************

This library provides a ``ConfigurationStep``
(from the library ``django-setup-configuration``, see the
`documentation <https://github.com/maykinmedia/django-setup-configuration>`_
for more information on how to run ``setup_configuration``)
to configure the notification configuration.

To add this step to your configuration steps, add ``django_setup_configuration`` to ``INSTALLED_APPS`` and add the following setting:

.. code:: python
SETUP_CONFIGURATION_STEPS = [
...
"notifications_api_common.contrib.setup_configuration.steps.NotificationConfigurationStep"
...
]
The YAML file that is passed to ``setup_configuration`` must set the
``notifications_config_enable`` flag to ``true`` to enable the step. All fields under ``notifications_config`` are optional.

Example file:

.. code:: yaml
notifications_config_enable: True
notifications_config:
notifications_api_service_identifier: notifs-api
notification_delivery_max_retries: 1
notification_delivery_retry_backoff: 2
notification_delivery_retry_backoff_max: 3
If the ``notifications_api_service_identifier`` is specified, it might also be useful
to use the `ServiceConfigurationStep <https://zgw-consumers.readthedocs.io/en/latest/setup_config.html>`_
from ``zgw-consumers``.

0 comments on commit 9647d84

Please sign in to comment.