def confirmation_view(template, doc='Display a confirmation view.'):
 def confirmed(request):
  comment = None
  if ('c' in request.GET):
   try:
    comment = comments.get_model().objects.get(pk=request.GET['c'])
   except (ObjectDoesNotExist, ValueError):
    pass
  return render_to_response(template, {'comment': comment}, context_instance=RequestContext(request))
 confirmed.__doc__ = textwrap.dedent(('        %s\n\n        Templates: `%s``\n        Context:\n            comment\n                The posted comment\n        ' % (doc, template)))
 return confirmed

def confirmation_view ( template , doc = 'Display a confirmation view.' ) : def confirmed ( request ) : comment = None if ( 'c' in request . GET ) : try : comment = comments . get_model ( ) . objects . get ( pk = request . GET [ 'c' ] ) except ( ObjectDoesNotExist , ValueError ) : pass return render_to_response ( template , { 'comment' : comment } , context_instance = RequestContext ( request ) ) confirmed . __doc__ = textwrap . dedent ( ( '        %s\n\n        Templates: `%s``\n        Context:\n            comment\n                The posted comment\n        ' % ( doc , template ) ) ) return confirmed
confirmation view generator for the "comment was posted/flagged/deleted/approved" views .