#NEWLINE# @ login_required #NEWLINE# def single( request , id , mark_seen = True ) : #NEWLINE# #INDENT# "\n    Detail view for a single :model:`notification.Notice`.\n    \n    Template: :template:`notification/single.html`\n    \n    Context:\n    \n        notice\n            The :model:`notification.Notice` being viewed\n    \n    Optional arguments:\n    \n        mark_seen\n            If ``True``, mark the notice as seen if it isn't\n            already.  Do nothing if ``False``.  Default: ``True``.\n    " #NEWLINE# notice = get_object_or_404 ( Notice , id = id ) #NEWLINE# if ( request . user == notice . recipient ) : #NEWLINE# #INDENT# if ( mark_seen and notice . unseen ) : #NEWLINE# #INDENT# notice . unseen = False #NEWLINE# notice . save ( ) #NEWLINE# #UNINDENT# return render_to_response ( 'notification/single.html' , { #NEWLINE# #INDENT# 'notice' : notice , #NEWLINE# #UNINDENT# } , context_instance = RequestContext ( request ) ) #NEWLINE# #UNINDENT# raise Http404