~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to notification/context_processors.py

  • Committer: franku
  • Date: 2017-04-17 12:43:17 UTC
  • mto: This revision was merged to the branch mainline in revision 456.
  • Revision ID: somal@arcor.de-20170417124317-kpyyf0w7htu87yh6
removed unused files; queued e-mails

Show diffs side-by-side

added added

removed removed

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