Feature/ogc 1725 news subscribe for categories
Newsletter: Support for newsletter category definition and subscription
An organization can define newsletter categories. Subscribing users can select their categories of interest and will only receive newsletters that report on at least one of their subscribed categories.
TYPE: Feature LINK: ogc-1725
Checklist
- [x] I have performed a self-review of my code
- [x] I considered adding a reviewer
- [x] I have updated the PO files
- [x] I made changes/features for both org and town6
- [x] I have added tests for my changes/features
Codecov Report
Attention: Patch coverage is 88.63636% with 15 lines in your changes missing coverage. Please review.
Project coverage is 89.48%. Comparing base (
b1cb2d8) to head (743c970). Report is 3 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/onegov/org/forms/settings.py | 65.90% | 15 Missing :warning: |
Additional details and impacted files
| Files with missing lines | Coverage Δ | |
|---|---|---|
| src/onegov/newsletter/collection.py | 100.00% <ø> (ø) |
|
| src/onegov/newsletter/models.py | 98.83% <100.00%> (+0.02%) |
:arrow_up: |
| src/onegov/org/forms/newsletter.py | 87.28% <100.00%> (+0.78%) |
:arrow_up: |
| src/onegov/org/forms/signup.py | 100.00% <100.00%> (ø) |
|
| src/onegov/org/layout.py | 91.52% <100.00%> (+0.03%) |
:arrow_up: |
| src/onegov/org/models/organisation.py | 97.95% <100.00%> (+0.01%) |
:arrow_up: |
| src/onegov/org/utils.py | 85.55% <100.00%> (+0.51%) |
:arrow_up: |
| src/onegov/org/views/newsletter.py | 96.71% <100.00%> (+0.48%) |
:arrow_up: |
| src/onegov/town6/views/newsletter.py | 100.00% <100.00%> (ø) |
|
| src/onegov/org/forms/settings.py | 80.36% <65.90%> (-1.60%) |
:arrow_down: |
... and 1 file with indirect coverage changes
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update b1cb2d8...743c970. Read the comment docs.
more information on how to use the categories, it's not clear to me where they can be created.
In /newsletter-settings you can define the categories as yaml list, an example is provided
Open items after review:
- [x] Initial newsletter subscription: success message with categories
- [x] Initial newsletter subscription: email confirmation with categories
- [x] newsletter subscription email with update link
- [x] newsletter subscription redirect to
/homeor/news - [x] prepare own view to 'edit newsletter subscription'
- [x] remove edit bar for
sendview
@BreathingFlesh Would we need a navigation back to /newsletters once we are in /newsletters/update? What do you think?