Messaging Internals
codex_django.messaging
codex_django.messaging
Django-specific messaging infrastructure for Codex projects.
Classes
DjangoArqClient
Thin Django-friendly wrapper around codex-platform's ARQ adapter.
Source code in src/codex_django/messaging/adapters/arq_client.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |
Methods:
build_redis_settings_from_django()
staticmethod
Build ARQ RedisSettings from Django settings as a convenience fallback.
Source code in src/codex_django/messaging/adapters/arq_client.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | |
enqueue(task_name, payload)
Enqueue a task synchronously via the platform ARQ adapter.
Source code in src/codex_django/messaging/adapters/arq_client.py
71 72 73 74 | |
aenqueue(task_name, payload)
async
Enqueue a task asynchronously via the platform ARQ adapter.
Source code in src/codex_django/messaging/adapters/arq_client.py
76 77 78 79 | |
DjangoCacheAdapter
Notification content cache adapter backed by Redis.
Source code in src/codex_django/messaging/adapters/cache_adapter.py
21 22 23 24 25 26 27 28 29 30 31 32 | |
Methods:
get(key)
Return a cached content value by key.
Source code in src/codex_django/messaging/adapters/cache_adapter.py
24 25 26 27 | |
set(key, value, timeout)
Store a cached content value with a TTL.
Source code in src/codex_django/messaging/adapters/cache_adapter.py
29 30 31 32 | |
DjangoDirectAdapter
Deliver notifications inline via Django send_mail().
Notes
The adapter implements the same enqueue interface as the queue-based adapter, which makes it useful for development, testing, and fallback delivery paths.
Source code in src/codex_django/messaging/adapters/direct_adapter.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | |
Methods:
enqueue(task_name, payload)
Synchronously deliver or schedule delivery of a notification payload.
Source code in src/codex_django/messaging/adapters/direct_adapter.py
55 56 57 58 59 60 61 62 | |
aenqueue(task_name, payload)
async
Asynchronously deliver a notification payload in a worker thread.
Source code in src/codex_django/messaging/adapters/direct_adapter.py
64 65 66 67 68 69 | |
EmailSettingsRedisManager
Bases: BaseDjangoRedisManager
Persist email settings into a dedicated Redis hash.
Source code in src/codex_django/messaging/adapters/email_settings.py
12 13 14 15 16 17 18 19 20 21 22 23 24 | |
Methods:
sync(data)
Write the latest serialized email settings to Redis.
Source code in src/codex_django/messaging/adapters/email_settings.py
18 19 20 21 22 23 24 | |
DjangoI18nAdapter
Wraps Django's translation.override() for messaging language switching.
Source code in src/codex_django/messaging/adapters/i18n_adapter.py
18 19 20 21 22 23 24 | |
DjangoQueueAdapter
Queue-backed notification adapter for ARQ-based delivery.
Source code in src/codex_django/messaging/adapters/queue_adapter.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | |
Methods:
enqueue(task_name, payload)
Synchronously enqueue a notification payload.
Returns None when use_on_commit=True because the job is not
enqueued until the transaction commits. Otherwise returns the ARQ job id.
Source code in src/codex_django/messaging/adapters/queue_adapter.py
35 36 37 38 39 40 41 42 43 44 45 46 | |
aenqueue(task_name, payload)
async
Asynchronously enqueue a notification payload without on_commit.
Source code in src/codex_django/messaging/adapters/queue_adapter.py
48 49 50 | |
BaseAudienceBuilder
Django base for streaming campaign recipients from a configured model.
Source code in src/codex_django/messaging/audience.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |
Methods:
base_queryset()
Return the unfiltered base queryset.
Source code in src/codex_django/messaging/audience.py
44 45 46 | |
apply_filters(qs, audience_filter)
Project override point for custom queryset filtering.
Source code in src/codex_django/messaging/audience.py
48 49 50 | |
to_draft(obj)
Convert one ORM object into a portable recipient draft.
Source code in src/codex_django/messaging/audience.py
52 53 54 55 56 57 58 59 60 61 | |
count(audience_filter)
Count recipients after applying project filters.
Source code in src/codex_django/messaging/audience.py
63 64 65 66 | |
materialize(audience_filter)
Stream recipient drafts in bounded chunks.
Source code in src/codex_django/messaging/audience.py
68 69 70 71 72 | |
CampaignRecipientDraft
dataclass
Portable recipient row for campaign batching.
Source code in src/codex_django/messaging/audience.py
13 14 15 16 17 18 19 20 21 22 | |
MessagingPayloadBuilder
Build serializable payload dictionaries for messaging queue tasks.
The builder is framework-agnostic and intentionally avoids Django imports so it can be reused in synchronous, asynchronous, and worker contexts.
Source code in src/codex_django/messaging/builder.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | |
Methods:
build_template(*, notification_id, recipient_email, recipient_phone=None, client_name='', template_name, subject, event_type, context_data, channels, language='de')
Build a payload where the worker renders the template itself.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
notification_id
|
str
|
Unique notification identifier. |
required |
recipient_email
|
str
|
Destination email address. |
required |
recipient_phone
|
str | None
|
Optional phone number for SMS/WhatsApp channels. |
None
|
client_name
|
str
|
Optional human-readable recipient name. |
''
|
template_name
|
str
|
Worker-side template path to render. |
required |
subject
|
str
|
Localized notification subject. |
required |
event_type
|
str
|
Logical event identifier. |
required |
context_data
|
dict[str, Any]
|
Extra template context data. |
required |
channels
|
list[str]
|
Delivery channels requested for the notification. |
required |
language
|
str
|
Language code attached to the payload. |
'de'
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
A plain dictionary compatible with the template-based notification |
dict[str, Any]
|
DTO expected by the queue worker. |
Source code in src/codex_django/messaging/builder.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | |
build_rendered(*, notification_id, recipient_email, recipient_phone=None, client_name='', html_content, text_content='', subject, event_type, channels, language='de', context_data=None)
Build a payload that already contains rendered notification content.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
notification_id
|
str
|
Unique notification identifier. |
required |
recipient_email
|
str
|
Destination email address. |
required |
recipient_phone
|
str | None
|
Optional phone number for SMS/WhatsApp channels. |
None
|
client_name
|
str
|
Optional human-readable recipient name. |
''
|
html_content
|
str
|
Pre-rendered HTML body. |
required |
text_content
|
str
|
Optional plain-text body. |
''
|
subject
|
str
|
Localized notification subject. |
required |
event_type
|
str
|
Logical event identifier. |
required |
channels
|
list[str]
|
Delivery channels requested for the notification. |
required |
language
|
str
|
Language code attached to the payload. |
'de'
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
A plain dictionary compatible with the rendered notification DTO |
dict[str, Any]
|
expected by the queue worker. |
Source code in src/codex_django/messaging/builder.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | |
MessagingBridge
Bases: Protocol
Project adapter that exposes messaging state and write actions to cabinet.
Source code in src/codex_django/messaging/cabinet/bridge.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | |
MessagingCabinetPresenter
Map project-provided messaging states into cabinet template contexts.
Source code in src/codex_django/messaging/cabinet/presenters.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
MessagingCabinetWorkflowService
Validate simple cabinet payloads and delegate writes to a project bridge.
Source code in src/codex_django/messaging/cabinet/workflows.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | |
CampaignBatch
dataclass
Bounded batch handed to a project-owned dispatcher.
Source code in src/codex_django/messaging/campaigns.py
12 13 14 15 16 17 18 19 20 21 22 23 24 | |
CampaignDispatcherProtocol
Bases: Protocol
Minimal dispatcher interface for campaign batch handoff.
Source code in src/codex_django/messaging/campaigns.py
27 28 29 30 | |
CampaignService
Compose audience streaming and dispatcher handoff for campaigns.
Source code in src/codex_django/messaging/campaigns.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | |
Methods:
count_recipients(audience_filter)
Return the filtered audience size.
Source code in src/codex_django/messaging/campaigns.py
52 53 54 | |
build_batches(*, campaign_id, subject, audience_filter, template_key='', locale='de', body_text='', body_translations=None, base_context=None)
Materialize the audience into bounded dispatcher batches.
Source code in src/codex_django/messaging/campaigns.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | |
send(*, campaign_id, subject, audience_filter, template_key='', locale='de', body_text='', body_translations=None, base_context=None)
Build and enqueue all campaign batches.
Source code in src/codex_django/messaging/campaigns.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | |
ContentSelectorProtocol
Bases: Protocol
Localized content lookup contract used by messaging dispatch.
Source code in src/codex_django/messaging/contracts.py
37 38 39 40 | |
NotificationDispatchSpec
dataclass
Normalized dispatch contract for one message delivery request.
Source code in src/codex_django/messaging/contracts.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | |
NotificationEventHandler
Bases: Protocol
Decorator-friendly handler that yields one or more dispatch specs.
Source code in src/codex_django/messaging/contracts.py
43 44 45 46 47 48 | |
QueueAdapterProtocol
Bases: Protocol
Minimal queue adapter contract required by the messaging engine.
Source code in src/codex_django/messaging/contracts.py
29 30 31 32 33 34 | |
MessagingEventRegistry
Collect handlers that translate domain events into dispatch specs.
Source code in src/codex_django/messaging/registry.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |
Methods:
register(event_type)
Register a handler for a logical notification event.
Source code in src/codex_django/messaging/registry.py
17 18 19 20 21 22 23 24 | |
get_handlers(event_type)
Return all handlers registered for one logical event type.
Source code in src/codex_django/messaging/registry.py
26 27 28 | |
build_specs(event_type, *args, **kwargs)
Execute handlers and normalize their output into dispatch specs.
Source code in src/codex_django/messaging/registry.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |
email_template(event_type, *, channels)
Register a template-mode builder.
Source code in src/codex_django/messaging/registry.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
email_rendered(event_type, *, channels)
Register a rendered-mode builder.
Source code in src/codex_django/messaging/registry.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | |
BaseEmailContentSelector
Retrieve messaging text blocks with cache and language awareness.
The selector is model-agnostic: the concrete content model, cache adapter, and i18n adapter are injected by the project at construction time.
Notes
Default cache TTL is one hour.
Source code in src/codex_django/messaging/selector.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | |
Methods:
__init__(model, cache_adapter, i18n_adapter)
Initialize the selector with project-specific dependencies.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
Any
|
Concrete content model class used for lookups. |
required |
cache_adapter
|
Any
|
Cache adapter implementing |
required |
i18n_adapter
|
Any
|
Adapter exposing a |
required |
Source code in src/codex_django/messaging/selector.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | |
get(key, language='')
Return the messaging text for a key in the requested language.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str
|
Logical content key stored in the backing model. |
required |
language
|
str
|
Target Django language code. Falls back to
|
''
|
Returns:
| Type | Description |
|---|---|
str | None
|
The resolved text value, or |
str | None
|
exists. |
Source code in src/codex_django/messaging/selector.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | |
invalidate(key, language='')
Invalidate a single cached messaging content entry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str
|
Logical content key stored in the backing model. |
required |
language
|
str
|
Language code associated with the cached value. Falls
back to |
''
|
Source code in src/codex_django/messaging/selector.py
91 92 93 94 95 96 97 98 99 100 | |
BaseMessagingEngine
Coordinate subject lookup, payload building, and queue dispatch.
Notes
task_name identifies the worker task that performs delivery.
mode controls whether the worker renders a template or receives
pre-rendered content directly.
Source code in src/codex_django/messaging/service.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | |
Methods:
__init__(queue_adapter, cache_adapter, i18n_adapter, selector)
Initialize the engine with project-provided infrastructure adapters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
queue_adapter
|
QueueAdapterProtocol
|
Adapter responsible for queueing or delivering work. |
required |
cache_adapter
|
Any
|
Cache adapter used by the project selector layer. |
required |
i18n_adapter
|
Any
|
Adapter that manages temporary language overrides. |
required |
selector
|
Any
|
Content selector used to resolve localized subjects. |
required |
Source code in src/codex_django/messaging/service.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | |
dispatch(*, recipient_email, recipient_phone=None, client_name='', template_name='', event_type, channels, language='', subject_key, subject='', mode=None, html_content='', text_content='', **context)
Resolve content metadata, build a payload, and enqueue a message.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
recipient_email
|
str
|
Destination email address. |
required |
recipient_phone
|
str | None
|
Optional phone number for SMS/WhatsApp channels. |
None
|
client_name
|
str
|
Optional human-readable recipient name. |
''
|
template_name
|
str
|
Worker-side template path for |
''
|
event_type
|
str
|
Logical messaging event identifier. |
required |
channels
|
list[str]
|
Delivery channels to request from the worker. |
required |
language
|
str
|
Language code used for subject lookup and payload metadata.
Falls back to |
''
|
subject_key
|
str
|
Content key used to resolve the localized subject. |
required |
subject
|
str
|
Optional explicit subject override. When provided, the selector lookup is skipped. |
''
|
mode
|
str | None
|
Optional per-call override for |
None
|
html_content
|
str
|
Pre-rendered HTML body for |
''
|
text_content
|
str
|
Optional plain-text fallback for |
''
|
**context
|
Any
|
Extra payload context passed to the worker. |
{}
|
Returns:
| Type | Description |
|---|---|
str | None
|
Queue job ID when the adapter returns one, otherwise |
Source code in src/codex_django/messaging/service.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | |
dispatch_spec(spec)
Dispatch one prebuilt spec produced by a domain handler.
Source code in src/codex_django/messaging/service.py
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | |
dispatch_event(event_type, *args, **kwargs)
Resolve registered handlers for an event and dispatch every resulting spec.
Source code in src/codex_django/messaging/service.py
174 175 176 177 | |
adispatch(*, recipient_email, recipient_phone=None, client_name='', template_name='', event_type, channels, language='', subject_key, subject='', mode=None, html_content='', text_content='', **context)
async
Asynchronous counterpart to :meth:dispatch for async call sites.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
recipient_email
|
str
|
Destination email address. |
required |
recipient_phone
|
str | None
|
Optional phone number for SMS/WhatsApp channels. |
None
|
client_name
|
str
|
Optional human-readable recipient name. |
''
|
template_name
|
str
|
Worker-side template path for |
''
|
event_type
|
str
|
Logical messaging event identifier. |
required |
channels
|
list[str]
|
Delivery channels to request from the worker. |
required |
language
|
str
|
Language code used for subject lookup and payload metadata.
Falls back to |
''
|
subject_key
|
str
|
Content key used to resolve the localized subject. |
required |
subject
|
str
|
Optional explicit subject override. When provided, the selector lookup is skipped. |
''
|
mode
|
str | None
|
Optional per-call override for |
None
|
html_content
|
str
|
Pre-rendered HTML body for |
''
|
text_content
|
str
|
Optional plain-text fallback for |
''
|
**context
|
Any
|
Extra payload context passed to the worker. |
{}
|
Returns:
| Type | Description |
|---|---|
str | None
|
Queue job ID when the adapter returns one, otherwise |
Source code in src/codex_django/messaging/service.py
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | |
adispatch_spec(spec)
async
Async counterpart to :meth:dispatch_spec.
Source code in src/codex_django/messaging/service.py
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | |
adispatch_event(event_type, *args, **kwargs)
async
Async counterpart to :meth:dispatch_event.
Source code in src/codex_django/messaging/service.py
272 273 274 275 276 277 278 | |
Functions:
get_email_settings_manager()
Return the default email settings Redis manager.
Source code in src/codex_django/messaging/adapters/email_settings.py
27 28 29 | |
build_default_mailbox_folders(*, base_url, active_folder='inbox')
Return common mailbox folders that projects may override in their bridge.
Source code in src/codex_django/messaging/cabinet/types/mailbox.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | |
build_messaging_sidebar(*, mailbox_url, campaigns_url, recipients_url, delivery_log_url, unread_badge_key='unread_messages_count')
Return the default Messaging sidebar without registering it globally.
Source code in src/codex_django/messaging/cabinet/navigation.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | |
build_messaging_topbar(url, *, label='Messaging', group='services', order=20)
Return the default Messaging topbar entry without registering it globally.
Source code in src/codex_django/messaging/cabinet/navigation.py
25 26 27 28 29 30 31 32 33 | |
email_rendered(event_type, *, channels=None)
Register a rendered-mode event builder.
Source code in src/codex_django/messaging/registry.py
160 161 162 163 164 | |
email_template(event_type, *, channels=None)
Register a template-mode event builder.
Source code in src/codex_django/messaging/registry.py
153 154 155 156 157 | |
notification_handler(event_type)
Convenience decorator backed by the global messaging event registry.
Source code in src/codex_django/messaging/registry.py
148 149 150 | |