forked frompython/pythondotorg
- Notifications
You must be signed in to change notification settings - Fork0
Commitf99aa6d
authored
Sponsorships notifications (python#1869)
* Sort apps by name* Add missing migration after help text change* Add new app to handle custom email dispatching* Add new model to configure sponsor notifications* Minimal admin* Update admin form to validate content as django template* Add button to preview how template will render* Add new benefit configuration to flag email targeatable* Add method to filter sponsorships by included features* Enable user to select which notification template to use* Rename variable* Display warning message if selected sponsorships aren't targetable* Introduce indirection with use case to send the emails* Implement method to create a EmailMessage from a notification template* Display non targetable sponsorship as checkbox instead of text* Add select all/delete all links* Filter emails by benefits, not feature configuration* Better display for notification objects* Add checkbox to select contact type* Update get_message method to accept boolean flags to control recipients* Rename form field name* Send notification to sponsors* Register email dispatch with admin log entry activity* Add input for custom email content* Display input for custom email content* UC expects sponsorship object, not PK* Consider email subject as a template as well* Refactor to move specific email building part to mailing app* Remove warning message* Optimizes sponsorship admin query* Add option to preview notification* Fix parameters names1 parent9dc7cbe commitf99aa6d
File tree
27 files changed
+934
-36
lines changed- mailing
- migrations
- tests
- pydotorg/settings
- sponsors
- migrations
- tests
- templates
- mailing/admin
- sponsors/admin
27 files changed
+934
-36
lines changedWhitespace-only changes.
Lines changed: 47 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 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 | + |
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + |
Lines changed: 20 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + |
Whitespace-only changes.
Lines changed: 46 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 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 | + |
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + |
Lines changed: 29 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + |
Lines changed: 11 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
167 | 167 |
| |
168 | 168 |
| |
169 | 169 |
| |
170 |
| - | |
| 170 | + | |
| 171 | + | |
171 | 172 |
| |
172 | 173 |
| |
173 |
| - | |
| 174 | + | |
174 | 175 |
| |
| 176 | + | |
| 177 | + | |
| 178 | + | |
175 | 179 |
| |
| 180 | + | |
| 181 | + | |
| 182 | + | |
176 | 183 |
| |
| 184 | + | |
177 | 185 |
| |
178 | 186 |
| |
179 |
| - | |
180 |
| - | |
181 |
| - | |
182 |
| - | |
183 |
| - | |
184 |
| - | |
| 187 | + | |
185 | 188 |
| |
186 |
| - | |
187 |
| - | |
188 | 189 |
| |
189 | 190 |
| |
190 | 191 |
| |
|
Lines changed: 54 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | 3 |
| |
| 4 | + | |
4 | 5 |
| |
5 | 6 |
| |
6 | 7 |
| |
7 | 8 |
| |
| 9 | + | |
8 | 10 |
| |
9 | 11 |
| |
| 12 | + | |
10 | 13 |
| |
11 | 14 |
| |
12 | 15 |
| |
| |||
17 | 20 |
| |
18 | 21 |
| |
19 | 22 |
| |
| 23 | + | |
20 | 24 |
| |
21 | 25 |
| |
22 | 26 |
| |
| 27 | + | |
| 28 | + | |
23 | 29 |
| |
24 | 30 |
| |
25 | 31 |
| |
| |||
42 | 48 |
| |
43 | 49 |
| |
44 | 50 |
| |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
45 | 58 |
| |
46 | 59 |
| |
47 | 60 |
| |
48 | 61 |
| |
| 62 | + | |
49 | 63 |
| |
50 | 64 |
| |
51 | 65 |
| |
| |||
159 | 173 |
| |
160 | 174 |
| |
161 | 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 | + | |
162 | 201 |
| |
163 | 202 |
| |
164 | 203 |
| |
| |||
174 | 213 |
| |
175 | 214 |
| |
176 | 215 |
| |
177 |
| - | |
178 |
| - | |
| 216 | + | |
| 217 | + | |
179 | 218 |
| |
180 | 219 |
| |
181 | 220 |
| |
| |||
223 | 262 |
| |
224 | 263 |
| |
225 | 264 |
| |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
226 | 273 |
| |
227 | 274 |
| |
228 | 275 |
| |
| |||
251 | 298 |
| |
252 | 299 |
| |
253 | 300 |
| |
254 |
| - | |
255 |
| - | |
256 |
| - | |
257 |
| - | |
258 | 301 |
| |
259 | 302 |
| |
260 | 303 |
| |
| |||
303 | 346 |
| |
304 | 347 |
| |
305 | 348 |
| |
306 |
| - | |
307 | 349 |
| |
308 | 350 |
| |
309 | 351 |
| |
310 | 352 |
| |
311 |
| - | |
312 | 353 |
| |
313 | 354 |
| |
314 | 355 |
| |
315 | 356 |
| |
316 |
| - | |
317 | 357 |
| |
318 | 358 |
| |
319 | 359 |
| |
| |||
322 | 362 |
| |
323 | 363 |
| |
324 | 364 |
| |
325 |
| - | |
326 | 365 |
| |
327 | 366 |
| |
328 | 367 |
| |
| |||
334 | 373 |
| |
335 | 374 |
| |
336 | 375 |
| |
337 |
| - | |
338 | 376 |
| |
339 | 377 |
| |
340 | 378 |
| |
341 | 379 |
| |
342 |
| - | |
343 | 380 |
| |
344 | 381 |
| |
345 | 382 |
| |
| |||
358 | 395 |
| |
359 | 396 |
| |
360 | 397 |
| |
361 |
| - | |
362 | 398 |
| |
363 | 399 |
| |
364 | 400 |
| |
| |||
379 | 415 |
| |
380 | 416 |
| |
381 | 417 |
| |
382 |
| - | |
383 | 418 |
| |
384 | 419 |
| |
385 | 420 |
| |
| |||
551 | 586 |
| |
552 | 587 |
| |
553 | 588 |
| |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + |
0 commit comments
Comments
(0)