Releases: loopwerk/django-generic-notifications
2.3.1 (October 21, 2025)
Bugfixes
- Fix email template inconsistency. Realtime emails now fallback to message.html and message.txt, just like digest emails
2.3.0 (October 20, 2025)
New Features
EmailChannel.send_nowwill try fallback templates (closes #21)- Channels now have a way to determine if they can send a notification, using the
should_sendmethod (closes #19) - Instead of all channels being enabled for all notification types, and users only able to opt-out, it is now possible to set default channels per notification type (
default_channels), and globally per channel (enabled_by_default). Users can then opt-in into channels that are disabled by default - as long as they're not forbidden (closes #20)
Class renames
- Renamed
NotificationFrequency->NotificationFrequencyPreference - Renamed
DisabledNotificationTypeChannel->NotificationTypeChannelPreference
Technically speaking these are breaking changes, but only if you added an admin.py config for these models, since the public API is unchanged (these models are normally only used internally). I decided that it wasn't worth a major version bump.
NotificationFrequencyPreference should actually probably be renamed again, to NotificationTypeFrequencyPreference...
2.2.0 (October 20, 2025)
New Features
- Support targets which don't use integers as their primary keys (closes #18)
Documentation Changes
- Mention minimal Python and Django versions, and the
django.contrib.contenttypesrequirement
2.1.0 (October 18, 2025)
New Features
- Added new
NotificationType.forbidden_channelsproperty to disable certain channels for certain notification types
2.0.1 (October 13, 2025)
Bugfixes
- Improve performance by not always prefetching channels and target
This fixes performance for the common use case where people don't use Notification.target to dynamically generate the notification text. By always prefetching the target field, it was a performance penalty for everyone. Now you need to explicitly prefetch the target field yourself. See performance.md for more information.
Always prefetching the channels relationship didn't make sense since users don't normally display these fields.
Documentation Changes
- Fixed "prefetch deeper relationships" documentation to make it clear it's not just a matter of not being "efficient" with heterogeneous targets - it literally doesn't work
2.0.0 (October 12, 2025)
Improvements
- Moved the actual sending of emails within
EmailChannelto its own method. This makes it easy to subclass theEmailChanneland handle the sending via Celery for example, without having to repeat all the other logic of theEmailChannel. (closes #12) - The digest sending has been moved to its own
send_notification_digestsfunction. This is used by thesend_digest_emailscommand (renamed tosend_notification_digests) but can easily be used to start the digest sending via other means, in case you don’t want to use the management command as a cron job (closes #9) - Replaced the global
sent_email_attracking with a per-channel delivery status via a newNotificationChannelmodel (closes #16) - Renamed classes and methods to remove "email" terminology and make them channel-agnostic (closes #15)
- Enhanced channel architecture to support digest-only and realtime-only channels
Documentation changes
- Split the giant readme into multiple smaller files (closes #14)
- Added migration documentation for 2.0.0
Breaking changes
Class renames
- Renamed
NotificationChannel->BaseChannel - Renamed
NotificationFrequency->BaseFrequency
Model changes
- Renamed
EmailFrequencymodel toNotificationFrequencymodel
Method renames
- Renamed
NotificationType.default_email_frequency->NotificationType.default_frequency - Renamed
NotificationType.set_email_frequency->NotificationType.set_frequency - Renamed
NotificationType.get_email_frequency->NotificationType.get_frequency - Renamed
NotificationType.reset_email_frequency_to_default->NotificationType.reset_frequency_to_default
Command and function renames
- Renamed the
send_digest_emailscommand tosend_notification_digests
API changes
- The
get_notification_preferencesfunction now returnsnotification_frequencyinstead ofemail_frequency - The
processmethod moved from individual channel implementations to theBaseChannelclass, and calls eithersend_noworsend_digest
1.4.0 (October 11, 2025)
New Features
- Prefetch the
targetgeneric relationship by default (on Django 5.0+) (#11 by kevinrenskers)
Documentation Changes
- Include section on Admin Integration
- Added documentation for multi-lingual notifications
1.3.0 (August 13, 2025)
New Features
- Include an absolute link to notification.url in the default emails
1.2.1 (August 13, 2025)
Bugfixes
- Fix pluralization issue in the digest emails (no more "1 new notifications")
1.2.0 (August 11, 2025)
New Features
- Add a proper apps.py file with a proper verbose_name