#NEWLINE# @ csrf_protect #NEWLINE# @ permission_required ( 'comments.can_moderate' ) #NEWLINE# def approve( request , comment_id , next = None ) : #NEWLINE# #INDENT# '\n    Approve a comment (that is, mark it as public and non-removed). Confirmation\n    on GET, action on POST. Requires the "can moderate comments" permission.\n\n    Templates: `comments/approve.html`,\n    Context:\n        comment\n            the `comments.comment` object for approval\n    ' #NEWLINE# comment = get_object_or_404 ( comments . get_model ( ) , pk = comment_id , site__pk = settings . SITE_ID ) #NEWLINE# if ( request . method == 'POST' ) : #NEWLINE# #INDENT# perform_approve ( comment_id , comment ) #NEWLINE# return next_redirect ( request , next , approve_done , c = comment . pk ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return render_to_response ( 'comments/approve.html' , { #NEWLINE# #INDENT# 'comment' : comment , #NEWLINE# 'next' : next , #NEWLINE# #UNINDENT# } , template . RequestContext ( request ) )