Skip to content

Releases: loopwerk/django-generic-notifications

2.3.1 (October 21, 2025)

21 Oct 09:42
f2bf4a4

Choose a tag to compare

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)

20 Oct 21:22
7bf5f07

Choose a tag to compare

New Features

  • EmailChannel.send_now will try fallback templates (closes #21)
  • Channels now have a way to determine if they can send a notification, using the should_send method (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)

20 Oct 09:54
ab42966

Choose a tag to compare

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.contenttypes requirement

2.1.0 (October 18, 2025)

18 Oct 13:39
d84235d

Choose a tag to compare

New Features

  • Added new NotificationType.forbidden_channels property to disable certain channels for certain notification types

2.0.1 (October 13, 2025)

13 Oct 10:53
da573b2

Choose a tag to compare

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)

12 Oct 14:52
68682ce

Choose a tag to compare

Improvements

  • Moved the actual sending of emails within EmailChannel to its own method. This makes it easy to subclass the EmailChannel and handle the sending via Celery for example, without having to repeat all the other logic of the EmailChannel. (closes #12)
  • The digest sending has been moved to its own send_notification_digests function. This is used by the send_digest_emails command (renamed to send_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_at tracking with a per-channel delivery status via a new NotificationChannel model (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

Breaking changes

Class renames

  • Renamed NotificationChannel -> BaseChannel
  • Renamed NotificationFrequency -> BaseFrequency

Model changes

  • Renamed EmailFrequency model to NotificationFrequency model

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_emails command to send_notification_digests

API changes

  • The get_notification_preferences function now returns notification_frequency instead of email_frequency
  • The process method moved from individual channel implementations to the BaseChannel class, and calls either send_now or send_digest

1.4.0 (October 11, 2025)

11 Oct 20:23
47f6230

Choose a tag to compare

New Features

  • Prefetch the target generic 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)

13 Aug 11:23
3464cde

Choose a tag to compare

New Features

  • Include an absolute link to notification.url in the default emails

1.2.1 (August 13, 2025)

13 Aug 10:12
5236b9d

Choose a tag to compare

Bugfixes

  • Fix pluralization issue in the digest emails (no more "1 new notifications")

1.2.0 (August 11, 2025)

11 Aug 15:32
cd6c851

Choose a tag to compare

New Features

  • Add a proper apps.py file with a proper verbose_name