allianceauth/notifications/context_processors.py
Adarnof 1d99ef69d1 Front-end notification model
Context processor to count notifications for display in base template
Logging handler to generate notifications for users with permission
2016-02-13 05:25:57 +00:00

5 lines
156 B
Python

from .models import Notification
def user_notification_count(request):
return len(Notification.objects.filter(user=request.user).filter(viewed=False))