~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to notification/context_processors.py

  • Committer: franku
  • Date: 2016-07-02 12:38:06 UTC
  • mfrom: (404.2.56 widelands)
  • Revision ID: somal@arcor.de-20160702123806-q69u3d48s1prrxds
merged the django1_8 branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from notification.models import Notice
 
2
 
 
3
def notification(request):
 
4
    if request.user.is_authenticated():
 
5
        return {
 
6
            'notice_unseen_count': Notice.objects.unseen_count_for(request.user, on_site=True),
 
7
        }
 
8
    else:
 
9
        return {}