notifications: add new_notifications to context variables (#17111)

This commit is contained in:
Frédéric Péters 2017-06-22 14:42:48 +02:00
parent 71f0dd7b14
commit bf9a54b8dc
1 changed files with 1 additions and 0 deletions

View File

@ -123,6 +123,7 @@ class NotificationsCell(CellBase):
if user and user.is_authenticated():
extra_context['notifications'] = Notification.objects.filter(user=user,
start_timestamp__lte=now(), end_timestamp__gt=now()).order_by('-start_timestamp')
extra_context['new_notifications'] = extra_context['notifications'].filter(acked=False)
return extra_context
def get_badge(self, context):