edx-ace 1.11.3__tar.gz → 1.12.0__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.11.3 → edx-ace-1.12.0}/CHANGELOG.rst +27 -31
- edx-ace-1.12.0/PKG-INFO +312 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/README.rst +11 -11
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/__init__.py +1 -1
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/channel/__init__.py +3 -0
- edx-ace-1.12.0/edx_ace/channel/braze_push_notification.py +64 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/presentation.py +1 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/renderers.py +15 -0
- edx-ace-1.12.0/edx_ace/tests/channel/test_braze_push_notification.py +105 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/tests/test_policy.py +10 -6
- edx-ace-1.12.0/edx_ace/tests/utils/test_braze_utils.py +59 -0
- edx-ace-1.12.0/edx_ace/utils/braze.py +27 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/utils/signals.py +4 -0
- edx-ace-1.12.0/edx_ace.egg-info/PKG-INFO +312 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace.egg-info/SOURCES.txt +4 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace.egg-info/entry_points.txt +1 -1
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace.egg-info/requires.txt +1 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/requirements/base.in +1 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/setup.py +38 -8
- edx-ace-1.11.3/PKG-INFO +0 -316
- edx-ace-1.11.3/edx_ace.egg-info/PKG-INFO +0 -316
- {edx-ace-1.11.3 → edx-ace-1.12.0}/LICENSE.txt +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/MANIFEST.in +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/ace.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/apps.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/channel/braze.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/channel/django_email.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/channel/file.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/channel/mixins.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/channel/push_notification.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/channel/sailthru.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/delivery.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/errors.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/message.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/monitoring.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/policy.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/push_notifications/views/__init__.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/recipient.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/recipient_resolver.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/serialization.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/signals.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/templatetags/acetags.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/test_utils/__init__.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/tests/channel/test_braze.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/tests/channel/test_channel_helpers.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/tests/channel/test_django_email.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/tests/channel/test_file_email.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/tests/channel/test_push_notification.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/tests/channel/test_sailthru.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/tests/test_ace.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/tests/test_date.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/tests/test_delivery.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/tests/test_message.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/tests/test_presentation.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/tests/test_templates/testapp/edx_ace/testmessage/email/body.html +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/tests/test_templates/testapp/edx_ace/testmessage/email/head.html +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/tests/utils/test_signals.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/utils/__init__.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/utils/date.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/utils/once.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace/utils/plugins.py +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace.egg-info/dependency_links.txt +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace.egg-info/not-zip-safe +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/edx_ace.egg-info/top_level.txt +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/requirements/constraints.txt +0 -0
- {edx-ace-1.11.3 → edx-ace-1.12.0}/setup.cfg +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
Change Log
|
2
|
-
|
2
|
+
##########
|
3
3
|
|
4
4
|
..
|
5
5
|
All enhancements and patches to edx_ace will be documented
|
@@ -12,54 +12,55 @@ Change Log
|
|
12
12
|
.. There should always be an "Unreleased" section for changes pending release.
|
13
13
|
|
14
14
|
Unreleased
|
15
|
-
|
15
|
+
**********
|
16
16
|
|
17
17
|
[1.8.0] - 2024-03-06
|
18
|
-
|
18
|
+
--------------------
|
19
|
+
|
19
20
|
* Added support for ``Python 3.12``
|
20
21
|
* Dropped support for ``Django 3.2``
|
21
22
|
|
22
23
|
|
23
24
|
[1.7.0] - 2023-07-21
|
24
|
-
|
25
|
+
--------------------
|
25
26
|
|
26
27
|
* Switch from ``edx-sphinx-theme`` to ``sphinx-book-theme`` since the former is
|
27
28
|
deprecated
|
28
29
|
* Added support for django 4.2
|
29
30
|
|
30
31
|
[1.6.1] - 2023-02-07
|
31
|
-
|
32
|
+
--------------------
|
32
33
|
|
33
34
|
* Updated code coverage target in https://github.com/openedx/edx-ace/pull/189
|
34
35
|
* Updated Python Requirements in https://github.com/openedx/edx-ace/pull/199
|
35
36
|
* **Full Changelog**: https://github.com/openedx/edx-ace/compare/v1.6.0...v1.6.1
|
36
37
|
|
37
38
|
[1.5.0] - 2022-02-15
|
38
|
-
|
39
|
+
--------------------
|
39
40
|
|
40
41
|
* Added support for Django40
|
41
42
|
* Removed support for Django22, 30 and 31
|
42
43
|
|
43
44
|
[1.4.1] - 2021-12-06
|
44
|
-
|
45
|
+
--------------------
|
45
46
|
|
46
47
|
* Adds in the ability to override frequency caps for Braze emails. Can be accessed via
|
47
48
|
Message options using the key ``override_frequency_capping``. All emails containing the
|
48
49
|
``transactional`` Message option will also override frequency caps.
|
49
50
|
|
50
51
|
[1.4.0] - 2021-11-08
|
51
|
-
|
52
|
+
--------------------
|
52
53
|
|
53
54
|
* Deprecate the action_links property
|
54
55
|
* Add a get_action_links method and template tag to allow passing arguments to action links
|
55
56
|
|
56
57
|
[1.3.1] - 2021-08-17
|
57
|
-
|
58
|
+
--------------------
|
58
59
|
|
59
60
|
* Adjust name ``handles_delivery_for_message`` to ``overrides_delivery_for_message``
|
60
61
|
|
61
62
|
[1.3.0] - 2021-08-16
|
62
|
-
|
63
|
+
--------------------
|
63
64
|
|
64
65
|
* New channel method ``handles_delivery_for_message`` for allowing a default channel
|
65
66
|
to claim a message, even if it would normally be delivered to the configured
|
@@ -69,29 +70,29 @@ Unreleased
|
|
69
70
|
needed.
|
70
71
|
|
71
72
|
[1.2.0] - 2021-07-16
|
72
|
-
|
73
|
+
--------------------
|
73
74
|
|
74
75
|
* Added support for django 3.2
|
75
76
|
|
76
77
|
[1.1.1] - 2021-07-09
|
77
|
-
|
78
|
+
--------------------
|
78
79
|
|
79
80
|
* Removed upper constraint from Django
|
80
81
|
|
81
82
|
[1.1.0] - 2021-03-26
|
82
|
-
|
83
|
+
--------------------
|
83
84
|
|
84
85
|
* Braze: Add ACE_CHANNEL_BRAZE_FROM_EMAIL setting to override the normal from address
|
85
86
|
* Sailthru: Remove Braze rollout waffle flag
|
86
87
|
|
87
88
|
[1.0.1] - 2021-03-15
|
88
|
-
|
89
|
+
--------------------
|
89
90
|
|
90
91
|
* Braze: Add an unsubscribe action link
|
91
92
|
* Braze: Don't ask Braze to inline css, as ACE templates already have inline css
|
92
93
|
|
93
94
|
[1.0.0] - 2021-03-11
|
94
|
-
|
95
|
+
--------------------
|
95
96
|
|
96
97
|
* BREAKING: Recipient objects now take `lms_user_id` instead of `username`
|
97
98
|
* New `braze_email` backend, needing the following new configuration:
|
@@ -102,57 +103,52 @@ Unreleased
|
|
102
103
|
* ACE_CHANNEL_BRAZE_CAMPAIGNS (an optional dictionary of ACE message names to Braze campaign identifiers)
|
103
104
|
|
104
105
|
[0.1.18] - 2020-11-19
|
105
|
-
|
106
|
+
---------------------
|
106
107
|
|
107
108
|
* Updated he travis-badge in README.rst to point to travis-ci.com
|
108
109
|
|
109
110
|
[0.1.17] - 2020-10-19
|
110
|
-
|
111
|
+
---------------------
|
111
112
|
|
112
113
|
* Use IntEnum to avoid silent failure in value comparisons
|
113
114
|
|
114
115
|
[0.1.16] - 2020-10-17
|
115
|
-
|
116
|
+
---------------------
|
116
117
|
|
117
118
|
* Fixed Enum usage for Python 3.8 to avoid TypeError when comparing values
|
118
119
|
|
119
120
|
[0.1.15] - 2020-03-11
|
120
|
-
|
121
|
+
---------------------
|
121
122
|
|
122
123
|
* Added support for Python 3.8
|
123
124
|
* Removed support for Django 2.0 and 2.1
|
124
125
|
|
125
126
|
[0.1.14] - 2020-03-11
|
126
|
-
|
127
|
+
---------------------
|
127
128
|
|
128
129
|
* Fix trivial warning from deprecated use of attr library.
|
129
130
|
|
130
131
|
[0.1.13] - 2019-12-06
|
131
|
-
|
132
|
+
---------------------
|
132
133
|
|
133
134
|
* Django22 Support.
|
134
135
|
|
135
136
|
[0.1.12] - 2019-10-16
|
136
|
-
|
137
|
+
---------------------
|
137
138
|
|
138
139
|
* Reply_to field added in emails.
|
139
140
|
|
140
141
|
[0.1.10] - 2018-11-01
|
141
|
-
|
142
|
+
---------------------
|
142
143
|
|
143
144
|
* Django lazy text translations are handled properly.
|
144
145
|
|
145
|
-
|
146
146
|
[0.1.9] - 2018-07-13
|
147
|
-
|
147
|
+
--------------------
|
148
148
|
|
149
149
|
* Updated delivery logging
|
150
150
|
|
151
|
-
|
152
151
|
[0.1.0] - 2017-08-08
|
153
|
-
|
154
|
-
|
155
|
-
Added
|
156
|
-
_____
|
152
|
+
--------------------
|
157
153
|
|
158
|
-
* First release on PyPI.
|
154
|
+
* [Added] First release on PyPI.
|
edx-ace-1.12.0/PKG-INFO
ADDED
@@ -0,0 +1,312 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: edx-ace
|
3
|
+
Version: 1.12.0
|
4
|
+
Summary: Framework for Messaging
|
5
|
+
Home-page: https://github.com/openedx/edx-ace
|
6
|
+
Author: edX
|
7
|
+
Author-email: oscm@edx.org
|
8
|
+
License: AGPL 3.0
|
9
|
+
Keywords: Django edx
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
11
|
+
Classifier: Framework :: Django
|
12
|
+
Classifier: Framework :: Django :: 4.2
|
13
|
+
Classifier: Intended Audience :: Developers
|
14
|
+
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
|
15
|
+
Classifier: Natural Language :: English
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
19
|
+
Description-Content-Type: text/x-rst
|
20
|
+
Provides-Extra: sailthru
|
21
|
+
Provides-Extra: push_notifications
|
22
|
+
License-File: LICENSE.txt
|
23
|
+
|
24
|
+
edX Automated Communication Engine (A.C.E.)
|
25
|
+
###########################################
|
26
|
+
|
27
|
+
|License: AGPL v3| |Python CI| |Publish package to PyPi| |Status| |pypi-badge| |travis-badge| |codecov-badge|
|
28
|
+
|doc-badge| |pyversions-badge|
|
29
|
+
|
30
|
+
Purpose
|
31
|
+
*******
|
32
|
+
|
33
|
+
The `automated communication engine <https://edx-ace.readthedocs.io/en/latest/>`_, A.C.E. for short, is a Django app
|
34
|
+
for messaging learners on the Open edX platform. This
|
35
|
+
app can be installed in any Open edX project, but has only been tested with ``edx-platform``. Email delivery
|
36
|
+
(via Sailthru and Django Email)
|
37
|
+
are the currently supported delivery channels. In the future we may add support for other delivery channels such as push
|
38
|
+
notifications.
|
39
|
+
|
40
|
+
Getting Started
|
41
|
+
***************
|
42
|
+
|
43
|
+
For instructions on starting local development, see `Getting Started page <https://github.com/openedx/edx-ace/blob/master/docs/getting_started.rst>`_.
|
44
|
+
|
45
|
+
Getting Help
|
46
|
+
************
|
47
|
+
|
48
|
+
Documentation
|
49
|
+
-------------
|
50
|
+
|
51
|
+
See `the documentation`_. If you need more help see below.
|
52
|
+
|
53
|
+
.. _the documentation: https://edx-ace.readthedocs.io/en/latest/
|
54
|
+
|
55
|
+
More Help
|
56
|
+
----------
|
57
|
+
|
58
|
+
If you're having trouble, we have discussion forums at
|
59
|
+
https://discuss.openedx.org where you can connect with others in the
|
60
|
+
community.
|
61
|
+
|
62
|
+
Our real-time conversations are on Slack. You can request a `Slack
|
63
|
+
invitation`_, then join our `community Slack workspace`_.
|
64
|
+
|
65
|
+
For anything non-trivial, the best path is to open an issue in this
|
66
|
+
repository with as many details about the issue you are facing as you
|
67
|
+
can provide.
|
68
|
+
|
69
|
+
https://github.com/openedx/edx-ace/issues
|
70
|
+
|
71
|
+
For more information about these options, see the `help`_ page.
|
72
|
+
|
73
|
+
.. _Slack invitation: https://openedx.org/slack
|
74
|
+
.. _community Slack workspace: https://openedx.slack.com/
|
75
|
+
.. _help: https://openedx.org/getting-help
|
76
|
+
|
77
|
+
License
|
78
|
+
*******
|
79
|
+
|
80
|
+
The code in this repository is licensed under the AGPL 3.0 unless
|
81
|
+
otherwise noted.
|
82
|
+
|
83
|
+
Please see ``LICENSE.txt`` for details.
|
84
|
+
|
85
|
+
Contributing
|
86
|
+
************
|
87
|
+
|
88
|
+
Contributions are very welcome.
|
89
|
+
|
90
|
+
Please read `How To Contribute <https://openedx.org/r/how-to-contribute>`_ for details.
|
91
|
+
|
92
|
+
Even though they were written with ``edx-platform`` in mind, the guidelines
|
93
|
+
should be followed for Open edX code in general.
|
94
|
+
|
95
|
+
PR description template should be automatically applied if you are sending PR from github interface; otherwise you
|
96
|
+
can find it
|
97
|
+
at `PULL_REQUEST_TEMPLATE.md <https://github.com/openedx/edx-ace/blob/master/.github/PULL_REQUEST_TEMPLATE.md>`_
|
98
|
+
|
99
|
+
Issue report template should be automatically applied if you are sending it from github UI as well; otherwise you
|
100
|
+
can find it at `ISSUE_TEMPLATE.md <https://github.com/openedx/edx-ace/blob/master/.github/ISSUE_TEMPLATE.md>`_
|
101
|
+
|
102
|
+
The Open edX Code of Conduct
|
103
|
+
****************************
|
104
|
+
|
105
|
+
All community members are expected to follow the `Open edX Code of Conduct`_.
|
106
|
+
|
107
|
+
.. _Open edX Code of Conduct: https://openedx.org/code-of-conduct/
|
108
|
+
|
109
|
+
People
|
110
|
+
******
|
111
|
+
|
112
|
+
The assigned maintainers for this component and other project details may be
|
113
|
+
found in `Backstage`_. Backstage pulls this data from the ``catalog-info.yaml``
|
114
|
+
file in this repo.
|
115
|
+
|
116
|
+
.. _Backstage: https://open-edx-backstage.herokuapp.com/catalog/default/component/edx-ace
|
117
|
+
|
118
|
+
Reporting Security Issues
|
119
|
+
*************************
|
120
|
+
|
121
|
+
Please do not report security issues in public. Please email security@openedx.org.
|
122
|
+
|
123
|
+
.. |pypi-badge| image:: https://img.shields.io/pypi/v/edx-ace.svg
|
124
|
+
:target: https://pypi.python.org/pypi/edx-ace/
|
125
|
+
:alt: PyPI
|
126
|
+
|
127
|
+
.. |travis-badge| image:: https://travis-ci.com/edx/edx-ace.svg?branch=master
|
128
|
+
:target: https://travis-ci.com/edx/edx-ace
|
129
|
+
:alt: Travis
|
130
|
+
|
131
|
+
.. |codecov-badge| image:: http://codecov.io/github/edx/edx-ace/coverage.svg?branch=master
|
132
|
+
:target: http://codecov.io/github/edx/edx-ace?branch=master
|
133
|
+
:alt: Codecov
|
134
|
+
|
135
|
+
.. |doc-badge| image:: https://readthedocs.org/projects/edx-ace/badge/?version=latest
|
136
|
+
:target: http://edx-ace.readthedocs.io/en/latest/
|
137
|
+
:alt: Documentation
|
138
|
+
|
139
|
+
.. |pyversions-badge| image:: https://img.shields.io/pypi/pyversions/edx-ace.svg
|
140
|
+
:target: https://pypi.python.org/pypi/edx-ace/
|
141
|
+
:alt: Supported Python versions
|
142
|
+
|
143
|
+
.. |license-badge| image:: https://img.shields.io/github/license/edx/edx-ace.svg
|
144
|
+
:target: https://github.com/openedx/edx-ace/blob/master/LICENSE.txt
|
145
|
+
:alt: License
|
146
|
+
|
147
|
+
.. |License: AGPL v3| image:: https://img.shields.io/badge/License-AGPL_v3-blue.svg
|
148
|
+
:target: https://www.gnu.org/licenses/agpl-3.0
|
149
|
+
|
150
|
+
.. |Python CI| image:: https://github.com/openedx/edx-ace/actions/workflows/ci.yml/badge.svg
|
151
|
+
:target: https://github.com/openedx/edx-ace/actions/workflows/ci.yml
|
152
|
+
|
153
|
+
.. |Publish package to PyPi| image:: https://github.com/openedx/edx-ace/actions/workflows/pypi-publish.yml/badge.svg
|
154
|
+
:target: https://github.com/openedx/edx-ace/actions/workflows/pypi-release.yml
|
155
|
+
|
156
|
+
.. |Status| image:: https://img.shields.io/badge/Status-Maintained-brightgreen
|
157
|
+
|
158
|
+
|
159
|
+
Change Log
|
160
|
+
##########
|
161
|
+
|
162
|
+
..
|
163
|
+
All enhancements and patches to edx_ace will be documented
|
164
|
+
in this file. It adheres to the structure of http://keepachangelog.com/ ,
|
165
|
+
but in reStructuredText instead of Markdown (for ease of incorporation into
|
166
|
+
Sphinx documentation and the PyPI description).
|
167
|
+
|
168
|
+
This project adheres to Semantic Versioning (http://semver.org/).
|
169
|
+
|
170
|
+
.. There should always be an "Unreleased" section for changes pending release.
|
171
|
+
|
172
|
+
Unreleased
|
173
|
+
**********
|
174
|
+
|
175
|
+
[1.8.0] - 2024-03-06
|
176
|
+
--------------------
|
177
|
+
|
178
|
+
* Added support for ``Python 3.12``
|
179
|
+
* Dropped support for ``Django 3.2``
|
180
|
+
|
181
|
+
|
182
|
+
[1.7.0] - 2023-07-21
|
183
|
+
--------------------
|
184
|
+
|
185
|
+
* Switch from ``edx-sphinx-theme`` to ``sphinx-book-theme`` since the former is
|
186
|
+
deprecated
|
187
|
+
* Added support for django 4.2
|
188
|
+
|
189
|
+
[1.6.1] - 2023-02-07
|
190
|
+
--------------------
|
191
|
+
|
192
|
+
* Updated code coverage target in https://github.com/openedx/edx-ace/pull/189
|
193
|
+
* Updated Python Requirements in https://github.com/openedx/edx-ace/pull/199
|
194
|
+
* **Full Changelog**: https://github.com/openedx/edx-ace/compare/v1.6.0...v1.6.1
|
195
|
+
|
196
|
+
[1.5.0] - 2022-02-15
|
197
|
+
--------------------
|
198
|
+
|
199
|
+
* Added support for Django40
|
200
|
+
* Removed support for Django22, 30 and 31
|
201
|
+
|
202
|
+
[1.4.1] - 2021-12-06
|
203
|
+
--------------------
|
204
|
+
|
205
|
+
* Adds in the ability to override frequency caps for Braze emails. Can be accessed via
|
206
|
+
Message options using the key ``override_frequency_capping``. All emails containing the
|
207
|
+
``transactional`` Message option will also override frequency caps.
|
208
|
+
|
209
|
+
[1.4.0] - 2021-11-08
|
210
|
+
--------------------
|
211
|
+
|
212
|
+
* Deprecate the action_links property
|
213
|
+
* Add a get_action_links method and template tag to allow passing arguments to action links
|
214
|
+
|
215
|
+
[1.3.1] - 2021-08-17
|
216
|
+
--------------------
|
217
|
+
|
218
|
+
* Adjust name ``handles_delivery_for_message`` to ``overrides_delivery_for_message``
|
219
|
+
|
220
|
+
[1.3.0] - 2021-08-16
|
221
|
+
--------------------
|
222
|
+
|
223
|
+
* New channel method ``handles_delivery_for_message`` for allowing a default channel
|
224
|
+
to claim a message, even if it would normally be delivered to the configured
|
225
|
+
transactional channel.
|
226
|
+
* Braze: Will handle any message defined in ``ACE_CHANNEL_BRAZE_CAMPAIGNS`` (using the
|
227
|
+
above new feature) to steal campaign messages from the transactional channel as
|
228
|
+
needed.
|
229
|
+
|
230
|
+
[1.2.0] - 2021-07-16
|
231
|
+
--------------------
|
232
|
+
|
233
|
+
* Added support for django 3.2
|
234
|
+
|
235
|
+
[1.1.1] - 2021-07-09
|
236
|
+
--------------------
|
237
|
+
|
238
|
+
* Removed upper constraint from Django
|
239
|
+
|
240
|
+
[1.1.0] - 2021-03-26
|
241
|
+
--------------------
|
242
|
+
|
243
|
+
* Braze: Add ACE_CHANNEL_BRAZE_FROM_EMAIL setting to override the normal from address
|
244
|
+
* Sailthru: Remove Braze rollout waffle flag
|
245
|
+
|
246
|
+
[1.0.1] - 2021-03-15
|
247
|
+
--------------------
|
248
|
+
|
249
|
+
* Braze: Add an unsubscribe action link
|
250
|
+
* Braze: Don't ask Braze to inline css, as ACE templates already have inline css
|
251
|
+
|
252
|
+
[1.0.0] - 2021-03-11
|
253
|
+
--------------------
|
254
|
+
|
255
|
+
* BREAKING: Recipient objects now take `lms_user_id` instead of `username`
|
256
|
+
* New `braze_email` backend, needing the following new configuration:
|
257
|
+
|
258
|
+
* ACE_CHANNEL_BRAZE_API_KEY
|
259
|
+
* ACE_CHANNEL_BRAZE_APP_ID
|
260
|
+
* ACE_CHANNEL_BRAZE_REST_ENDPOINT (like `rest.iad-01.braze.com`)
|
261
|
+
* ACE_CHANNEL_BRAZE_CAMPAIGNS (an optional dictionary of ACE message names to Braze campaign identifiers)
|
262
|
+
|
263
|
+
[0.1.18] - 2020-11-19
|
264
|
+
---------------------
|
265
|
+
|
266
|
+
* Updated he travis-badge in README.rst to point to travis-ci.com
|
267
|
+
|
268
|
+
[0.1.17] - 2020-10-19
|
269
|
+
---------------------
|
270
|
+
|
271
|
+
* Use IntEnum to avoid silent failure in value comparisons
|
272
|
+
|
273
|
+
[0.1.16] - 2020-10-17
|
274
|
+
---------------------
|
275
|
+
|
276
|
+
* Fixed Enum usage for Python 3.8 to avoid TypeError when comparing values
|
277
|
+
|
278
|
+
[0.1.15] - 2020-03-11
|
279
|
+
---------------------
|
280
|
+
|
281
|
+
* Added support for Python 3.8
|
282
|
+
* Removed support for Django 2.0 and 2.1
|
283
|
+
|
284
|
+
[0.1.14] - 2020-03-11
|
285
|
+
---------------------
|
286
|
+
|
287
|
+
* Fix trivial warning from deprecated use of attr library.
|
288
|
+
|
289
|
+
[0.1.13] - 2019-12-06
|
290
|
+
---------------------
|
291
|
+
|
292
|
+
* Django22 Support.
|
293
|
+
|
294
|
+
[0.1.12] - 2019-10-16
|
295
|
+
---------------------
|
296
|
+
|
297
|
+
* Reply_to field added in emails.
|
298
|
+
|
299
|
+
[0.1.10] - 2018-11-01
|
300
|
+
---------------------
|
301
|
+
|
302
|
+
* Django lazy text translations are handled properly.
|
303
|
+
|
304
|
+
[0.1.9] - 2018-07-13
|
305
|
+
--------------------
|
306
|
+
|
307
|
+
* Updated delivery logging
|
308
|
+
|
309
|
+
[0.1.0] - 2017-08-08
|
310
|
+
--------------------
|
311
|
+
|
312
|
+
* [Added] First release on PyPI.
|
@@ -5,7 +5,7 @@ edX Automated Communication Engine (A.C.E.)
|
|
5
5
|
|doc-badge| |pyversions-badge|
|
6
6
|
|
7
7
|
Purpose
|
8
|
-
|
8
|
+
*******
|
9
9
|
|
10
10
|
The `automated communication engine <https://edx-ace.readthedocs.io/en/latest/>`_, A.C.E. for short, is a Django app
|
11
11
|
for messaging learners on the Open edX platform. This
|
@@ -15,12 +15,12 @@ are the currently supported delivery channels. In the future we may add support
|
|
15
15
|
notifications.
|
16
16
|
|
17
17
|
Getting Started
|
18
|
-
|
18
|
+
***************
|
19
19
|
|
20
|
-
For instructions on starting local development, see `Getting Started <https://github.com/openedx/edx-ace/blob/master/docs/getting_started.rst>`_.
|
20
|
+
For instructions on starting local development, see `Getting Started page <https://github.com/openedx/edx-ace/blob/master/docs/getting_started.rst>`_.
|
21
21
|
|
22
22
|
Getting Help
|
23
|
-
|
23
|
+
************
|
24
24
|
|
25
25
|
Documentation
|
26
26
|
-------------
|
@@ -45,14 +45,14 @@ can provide.
|
|
45
45
|
|
46
46
|
https://github.com/openedx/edx-ace/issues
|
47
47
|
|
48
|
-
For more information about these options, see the `
|
48
|
+
For more information about these options, see the `help`_ page.
|
49
49
|
|
50
50
|
.. _Slack invitation: https://openedx.org/slack
|
51
51
|
.. _community Slack workspace: https://openedx.slack.com/
|
52
|
-
..
|
52
|
+
.. _help: https://openedx.org/getting-help
|
53
53
|
|
54
54
|
License
|
55
|
-
|
55
|
+
*******
|
56
56
|
|
57
57
|
The code in this repository is licensed under the AGPL 3.0 unless
|
58
58
|
otherwise noted.
|
@@ -60,7 +60,7 @@ otherwise noted.
|
|
60
60
|
Please see ``LICENSE.txt`` for details.
|
61
61
|
|
62
62
|
Contributing
|
63
|
-
|
63
|
+
************
|
64
64
|
|
65
65
|
Contributions are very welcome.
|
66
66
|
|
@@ -77,14 +77,14 @@ Issue report template should be automatically applied if you are sending it from
|
|
77
77
|
can find it at `ISSUE_TEMPLATE.md <https://github.com/openedx/edx-ace/blob/master/.github/ISSUE_TEMPLATE.md>`_
|
78
78
|
|
79
79
|
The Open edX Code of Conduct
|
80
|
-
|
80
|
+
****************************
|
81
81
|
|
82
82
|
All community members are expected to follow the `Open edX Code of Conduct`_.
|
83
83
|
|
84
84
|
.. _Open edX Code of Conduct: https://openedx.org/code-of-conduct/
|
85
85
|
|
86
86
|
People
|
87
|
-
|
87
|
+
******
|
88
88
|
|
89
89
|
The assigned maintainers for this component and other project details may be
|
90
90
|
found in `Backstage`_. Backstage pulls this data from the ``catalog-info.yaml``
|
@@ -93,7 +93,7 @@ file in this repo.
|
|
93
93
|
.. _Backstage: https://open-edx-backstage.herokuapp.com/catalog/default/component/edx-ace
|
94
94
|
|
95
95
|
Reporting Security Issues
|
96
|
-
|
96
|
+
*************************
|
97
97
|
|
98
98
|
Please do not report security issues in public. Please email security@openedx.org.
|
99
99
|
|
@@ -28,6 +28,7 @@ class ChannelType(Enum):
|
|
28
28
|
|
29
29
|
EMAIL = 'email'
|
30
30
|
PUSH = 'push'
|
31
|
+
BRAZE_PUSH = 'braze_push'
|
31
32
|
|
32
33
|
def __str__(self):
|
33
34
|
return str(self.value)
|
@@ -184,6 +185,8 @@ def get_channel_for_message(channel_type, message):
|
|
184
185
|
channel_names = [settings.ACE_CHANNEL_DEFAULT_EMAIL]
|
185
186
|
elif channel_type == ChannelType.PUSH and getattr(settings, "ACE_CHANNEL_DEFAULT_PUSH", None):
|
186
187
|
channel_names = [settings.ACE_CHANNEL_DEFAULT_PUSH]
|
188
|
+
elif channel_type == ChannelType.BRAZE_PUSH and getattr(settings, "ACE_CHANNEL_BRAZE_PUSH", None):
|
189
|
+
channel_names = [settings.ACE_CHANNEL_BRAZE_PUSH]
|
187
190
|
|
188
191
|
try:
|
189
192
|
possible_channels = [
|
@@ -0,0 +1,64 @@
|
|
1
|
+
"""
|
2
|
+
Channel for sending push notifications using braze.
|
3
|
+
"""
|
4
|
+
import logging
|
5
|
+
|
6
|
+
from django.conf import settings
|
7
|
+
|
8
|
+
from edx_ace.channel import Channel, ChannelType
|
9
|
+
from edx_ace.message import Message
|
10
|
+
from edx_ace.renderers import RenderedPushNotification
|
11
|
+
from edx_ace.utils.braze import get_braze_client
|
12
|
+
|
13
|
+
LOG = logging.getLogger(__name__)
|
14
|
+
|
15
|
+
|
16
|
+
class BrazePushNotificationChannel(Channel):
|
17
|
+
"""
|
18
|
+
A channel for sending push notifications using braze.
|
19
|
+
"""
|
20
|
+
channel_type = ChannelType.BRAZE_PUSH
|
21
|
+
_CAMPAIGNS_SETTING = 'ACE_CHANNEL_BRAZE_PUSH_CAMPAIGNS'
|
22
|
+
|
23
|
+
@classmethod
|
24
|
+
def enabled(cls):
|
25
|
+
"""
|
26
|
+
Returns: True iff braze client is available.
|
27
|
+
"""
|
28
|
+
return bool(get_braze_client())
|
29
|
+
|
30
|
+
def deliver(self, message: Message, rendered_message: RenderedPushNotification) -> None:
|
31
|
+
"""
|
32
|
+
Transmit a rendered message to a recipient.
|
33
|
+
|
34
|
+
Args:
|
35
|
+
message: The message to transmit.
|
36
|
+
rendered_message: The rendered content of the message that has been personalized
|
37
|
+
for this particular recipient.
|
38
|
+
"""
|
39
|
+
braze_campaign = message.options['braze_campaign']
|
40
|
+
emails = message.options.get('emails') or [message.recipient.email_address]
|
41
|
+
campaign_id = self._campaign_id(braze_campaign)
|
42
|
+
if not campaign_id:
|
43
|
+
LOG.info('Could not find braze campaign for notification %s', braze_campaign)
|
44
|
+
return
|
45
|
+
|
46
|
+
try:
|
47
|
+
braze_client = get_braze_client()
|
48
|
+
braze_client.send_campaign_message(
|
49
|
+
campaign_id=campaign_id,
|
50
|
+
trigger_properties=message.context['post_data'],
|
51
|
+
emails=emails
|
52
|
+
)
|
53
|
+
LOG.info('Sent push notification for %s with Braze', braze_campaign)
|
54
|
+
except Exception as exc: # pylint: disable=broad-except
|
55
|
+
LOG.error(
|
56
|
+
'Unable to send push notification for %s with Braze. Reason: %s',
|
57
|
+
braze_campaign,
|
58
|
+
str(exc)
|
59
|
+
)
|
60
|
+
|
61
|
+
@classmethod
|
62
|
+
def _campaign_id(cls, braze_campaign):
|
63
|
+
"""Returns the campaign ID for a given ACE message name or None if no match is found"""
|
64
|
+
return getattr(settings, cls._CAMPAIGNS_SETTING, {}).get(braze_campaign)
|
@@ -99,3 +99,18 @@ class PushNotificationRenderer(AbstractRenderer):
|
|
99
99
|
A renderer for :attr:`.ChannelType.PUSH` channels.
|
100
100
|
"""
|
101
101
|
rendered_message_cls = RenderedPushNotification
|
102
|
+
|
103
|
+
|
104
|
+
@attr.s
|
105
|
+
class RenderedBrazePushNotification:
|
106
|
+
"""
|
107
|
+
Encapsulates all values needed to send a :class:`.Message`
|
108
|
+
over an :attr:`.ChannelType.BRAZE_PUSH`.
|
109
|
+
"""
|
110
|
+
|
111
|
+
|
112
|
+
class BrazePushNotificationRenderer(AbstractRenderer):
|
113
|
+
"""
|
114
|
+
A renderer for :attr:`.ChannelType.PUSH` channels.
|
115
|
+
"""
|
116
|
+
rendered_message_cls = RenderedBrazePushNotification
|