You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been running an older fork of django-nyt with a few tweaks. I have to update my fork to the latest build anyway so I thought I'd check in and see if there's any interest in the specific changes made:
notifymail checks Setting.interval to be > -1 before sending notifications. -1 treated as disabling notifications (e-mails) for a user
notifymail checks the new field Settings.last_sent and compares it to the user's interval setting before sending mail. This makes cron jobs work properly with set intervals.
Support for HTML e-mail notification templates, notifymail tries for the HTML file and falls back to the text file.
Added to the Settings object:
Setting had a new field added last_sent to store a datetime when notifications were last sent to the user
Added a new setting and option to existing:
Added NYT_SEND_ONLY_LATEST setting to enable e-mail notifications for most recent notification or all unset notifications for the subscription.
Notification interval setting of -1 to represent disable e-mail notifications,
Improved the content returned by get_notifications:
Adding a target_obj method to Subscription to return the target object, if any.
Added type_lbl field to returned Json data in addition to the NotficationType.key that was already included.
Added target field to returned Json data, as the string representation of the target object (if any).
@benjaoming would there be any interest in some or all of these things as a PR?
The text was updated successfully, but these errors were encountered:
Hi @dwasyl - thanks so much for the detailed menu :)
I have to focus on getting a new release out (which I'm doing now) and after that, I can try to list out which of these things are already changed or fixed - and which would be interesting in a PR.
Hey there,
I've been running an older fork of
django-nyt
with a few tweaks. I have to update my fork to the latest build anyway so I thought I'd check in and see if there's any interest in the specific changes made:Improved
notifymail
with a number of changes:settings__user__is_active==False
#136) except handled bynotifymail.py
notifymail
checksSetting.interval
to be > -1 before sending notifications.-1
treated as disabling notifications (e-mails) for a usernotifymail
checks the new fieldSettings.last_sent
and compares it to the user'sinterval
setting before sending mail. This makes cron jobs work properly with set intervals.notifymail
tries for the HTML file and falls back to the text file.Added to the
Settings
object:Setting
had a new field addedlast_sent
to store a datetime when notifications were last sent to the userAdded a new setting and option to existing:
NYT_SEND_ONLY_LATEST
setting to enable e-mail notifications for most recent notification or all unset notifications for the subscription.-1
to represent disable e-mail notifications,Improved the content returned by
get_notifications
:target_obj
method toSubscription
to return the target object, if any.type_lbl
field to returned Json data in addition to theNotficationType.key
that was already included.target
field to returned Json data, as the string representation of the target object (if any).@benjaoming would there be any interest in some or all of these things as a PR?
The text was updated successfully, but these errors were encountered: