#NEWLINE# @ login_required #NEWLINE# def delete_access( request , pk ) : #NEWLINE# #INDENT# topic_private = TopicPrivate . objects . for_delete_or_404 ( pk , request . user ) #NEWLINE# if ( request . method == 'POST' ) : #NEWLINE# #INDENT# topic_private . delete ( ) #NEWLINE# if ( request . user . pk == topic_private . user_id ) : #NEWLINE# #INDENT# return redirect ( reverse ( 'spirit:topic:private:index' ) ) #NEWLINE# #UNINDENT# return redirect ( request . POST . get ( 'next' , topic_private . get_absolute_url ( ) ) ) #NEWLINE# #UNINDENT# context = { #NEWLINE# #INDENT# 'topic_private' : topic_private , #NEWLINE# #UNINDENT# } #NEWLINE# return render ( request , 'spirit/topic/private/delete.html' , context )