edx-ace 1.10.0__tar.gz → 1.10.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {edx-ace-1.10.0/edx_ace.egg-info → edx-ace-1.10.1}/PKG-INFO +1 -1
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/__init__.py +1 -1
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/channel/__init__.py +4 -2
- {edx-ace-1.10.0 → edx-ace-1.10.1/edx_ace.egg-info}/PKG-INFO +1 -1
- {edx-ace-1.10.0 → edx-ace-1.10.1}/CHANGELOG.rst +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/LICENSE.txt +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/MANIFEST.in +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/README.rst +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/ace.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/apps.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/channel/braze.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/channel/django_email.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/channel/file.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/channel/mixins.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/channel/push_notification.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/channel/sailthru.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/delivery.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/errors.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/message.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/monitoring.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/policy.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/presentation.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/push_notifications/views/__init__.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/recipient.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/recipient_resolver.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/renderers.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/serialization.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/templatetags/acetags.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/test_utils/__init__.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/tests/channel/test_braze.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/tests/channel/test_channel_helpers.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/tests/channel/test_django_email.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/tests/channel/test_file_email.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/tests/channel/test_push_notification.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/tests/channel/test_sailthru.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/tests/test_ace.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/tests/test_date.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/tests/test_delivery.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/tests/test_message.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/tests/test_policy.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/tests/test_presentation.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/tests/test_templates/testapp/edx_ace/testmessage/email/body.html +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/tests/test_templates/testapp/edx_ace/testmessage/email/head.html +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/utils/__init__.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/utils/date.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/utils/once.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace/utils/plugins.py +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace.egg-info/SOURCES.txt +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace.egg-info/dependency_links.txt +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace.egg-info/entry_points.txt +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace.egg-info/not-zip-safe +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace.egg-info/requires.txt +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/edx_ace.egg-info/top_level.txt +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/requirements/base.in +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/requirements/constraints.txt +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/setup.cfg +0 -0
- {edx-ace-1.10.0 → edx-ace-1.10.1}/setup.py +0 -0
@@ -5,6 +5,7 @@ to add new delivery :class:`Channel` instances to an ACE application.
|
|
5
5
|
Developers wanting to add a new deliver channel should subclass :class:`Channel`,
|
6
6
|
and then add an entry to the ``openedx.ace.channel`` entrypoint in their ``setup.py``.
|
7
7
|
"""
|
8
|
+
|
8
9
|
import abc
|
9
10
|
import itertools
|
10
11
|
from collections import OrderedDict, defaultdict
|
@@ -24,6 +25,7 @@ class ChannelType(Enum):
|
|
24
25
|
"""
|
25
26
|
All supported communication channels.
|
26
27
|
"""
|
28
|
+
|
27
29
|
EMAIL = 'email'
|
28
30
|
PUSH = 'push'
|
29
31
|
|
@@ -127,7 +129,7 @@ class ChannelMap:
|
|
127
129
|
except (StopIteration, KeyError) as error:
|
128
130
|
raise UnsupportedChannelError(
|
129
131
|
f'No implementation for channel {channel_type} is registered. '
|
130
|
-
f'Available channels are: {channels()}'
|
132
|
+
f'Available channels are: {channels()}',
|
131
133
|
) from error
|
132
134
|
|
133
135
|
def __str__(self):
|
@@ -178,7 +180,7 @@ def get_channel_for_message(channel_type, message):
|
|
178
180
|
channel_names = [settings.ACE_CHANNEL_TRANSACTIONAL_EMAIL, settings.ACE_CHANNEL_DEFAULT_EMAIL]
|
179
181
|
else:
|
180
182
|
channel_names = [settings.ACE_CHANNEL_DEFAULT_EMAIL]
|
181
|
-
elif channel_type == ChannelType.PUSH:
|
183
|
+
elif channel_type == ChannelType.PUSH and getattr(settings, "ACE_CHANNEL_DEFAULT_PUSH", None):
|
182
184
|
channel_names = [settings.ACE_CHANNEL_DEFAULT_PUSH]
|
183
185
|
|
184
186
|
try:
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|