pinax-notifications
pinax-notifications copied to clipboard
[Enhancement] NoticeSettingsView queryset
Thanks for this handy app!
Here is a suggestion for improving(?) the settings view:
Right now when users access settings view, they can update their settings for all NoticeTypes
.
A project might have some notices which are important and must be sent and it is better not to let users to opt out of those.
One way to handle this situation is using default
field to filter NoticeType
queryset in NoticeSettingsView
. For example:
# views.NoticeSettingsView
def settings_table(self):
notice_types = NoticeType.objects.filter(default__lt=settings.FILTER_THRESHOLD)
Or if there is any other built-in solution, please let me know! :)
@paltman Any thoughts on this?