#NEWLINE# @ login_required #NEWLINE# @ require_POST #NEWLINE# def unblock_user( request , username ) : #NEWLINE# #INDENT# user = get_object_or_404 ( User , ** { #NEWLINE# #INDENT# username_field : user , #NEWLINE# #UNINDENT# } ) #NEWLINE# if ( not perms . may_block_user ( request . user , user ) ) : #NEWLINE# #INDENT# raise PermissionDenied #NEWLINE# #UNINDENT# user . is_active = True #NEWLINE# user . save ( ) #NEWLINE# msg = _ ( 'User successfuly unblocked' ) #NEWLINE# messages . success ( request , msg , fail_silently = True ) #NEWLINE# return redirect ( 'pybb:index' )