Release Notes
1.4 (2024-02-16)
Hello 👋️ We’re alive and maintaining this!
This release puts django-nyt a step forwards toward being a mature framework, especially by adding Django 5 support, fixing issues and adding more tests. However, there are still some async capabilities remaining to be solved for it to be both mature and modern.
If you can get behind the concept, please consider the great potential of contributing to this project!
Added
Custom email templates per notification type: For instance, a site admin and a user may now receive different notification emails, both for content and subject line. This is controlled by two new dictionaries in your settings
NYT_EMAIL_TEMPLATE_NAMES
andNYT_EMAIL_SUBJECT_TEMPLATE_NAMES
. Templates are matched to a notification key pattern that uses glob expressions, so it’s now encouraged to use/
separators in notification keys, for instancecomments/new
is matched bycomments/**
. #125 (Benjamin Balder Bach)Django 5 support #128 (Benjamin Balder Bach)
New arguments
--domain
and--http-only
for management commandnotifymail
. #130 (Benjamin Balder Bach)Documentation reorganized with Diataxis structure and more how-to guides have been added. (Benjamin Balder Bach)
New shortcut function
utils.unsubscribe()
. #137 (Benjamin Balder Bach)Better logging for
notifymail
management command #141 (Benjamin Balder Bach)Added fields
created
andmodified
on modelsSettings
andSubscription
#142 (Benjamin Balder Bach)
Changed
Tests migrated to pytest #123 (Benjamin Balder Bach)
Default email notification paths are changed to
notifications/emails/default.txt
andnotifications/emails/default_subject.txt
#125 (Benjamin Balder Bach)Notification URLs added to emails have a hard-coded https:// (before, this was http://) #125 (Benjamin Balder Bach)
New test-friendly settings pattern changes internal names of settings, but has no effects on Django settings #127 (Benjamin Balder Bach)
Corrected name of method to
Settings.get_default_settings
#129 (Benjamin Balder Bach)Improvements to docstrings of main methods
notify()
andsubscribe()
#129 (Benjamin Balder Bach)Return value of
notify()
was changed - it no longer returns an int (number of created notifications), instead it returns a list of created notifications. This is very useful, see How to map a related object to a notification #134 (Benjamin Balder Bach)The field
Notification.url
now accepts 2,000 characters rather than 200 #142 (Benjamin Balder Bach)
Fixed
Template files possible for email subjects. Previously, this file was ignored #125 (Benjamin Balder Bach)
Notifications without URLs had a broken URL in emails #125 (Benjamin Balder Bach)
Management command
notifymail
to send emails is more robust #129 (Benjamin Balder Bach)Settings.save
recursively called itself when adding a non-default setting #140 (Benjamin Balder Bach)Weekly digests weren’t correctly generated #142 (Benjamin Balder Bach)
Removed
Python 3.7 support removed #129 (Benjamin Balder Bach)
Unused (!) setting
NYT_ENABLED
was removed #134 (Benjamin Balder Bach)
1.3 (2023-05-03)
Hatch build system, environment management and more #116 (Oscar Cortez)
pre-commit configuration updated #116 (Oscar Cortez)
Code-base black’ned #116 (Oscar Cortez)
1.2.4 (2022-11-11)
Adds Django 4.1 support #113 (Oscar Cortez)
1.2.3
Add missing .txt email template files in distributed packages #109
1.2.2
Adds a no-op migration because of auto-detected changes
1.2.1
Django 4.0 and Python 3.10 support (added to test matrix)
1.2
Added
Django 3.2 and Python 3.9 support (added to test matrix)
Travis replaced with Circle CI
Removed
Django 1.11 and 2.1 support
1.1.6
Added
Django 3.1 support (added to test matrix)
1.1.5
Fixed
Do not access
Settings.user
inSettings.clean()
on blank new objects #92
1.1.4
Added
Django 3.0 support (added to test matrix)
1.1.3
Added
Django 2.2 support (added to test matrix)
Linting (no changes to functionality)
1.1.2
Added
Django 2.1 support (no changes in code)
1.1.1
Added
Python 3.7 support #81
Deprecations
Removed
django_nyt.notify
, usedjango_nyt.utils.notify
1.1
New features
Django 2.0 support #55
Bug fixes
Restored missing translation files #73
Deprecations
1.0
Starting from django-nyt 1.0, support for the upcoming channels has been added together with Django 1.9, 1.10 and 1.11 support.
You can switch off django-channels by setting
settings.NYT_CHANNELS_DISABLE = True
.
New features
Bug fixes
Celery will auto-load
django_nyt.tasks
whenchannels
isn’t installed #23Error in channels consumer when requested with AnonymousUser (Benjamin Bach) #50 #51
Clear the notification type cache every time a new notification type is created or deleted (Benjamin Bach) #34 #36
Explicitly accept WebSocket connections (Kim Desrosiers) #35
Fix critical django-channels err (Tomaž Žniderič) #29
Correctly set default options for
notifymail
management command (Benjamin Bach) #32Adds Django 1.11 to test matrix (Benjamin Bach) #32
Do not return
bytes
in__str__
(Øystein Hiåsen) #28
Deprecations
Django 1.5 and 1.6 support is dropped