#NEWLINE# def _process_mass_form( f ) : #NEWLINE# #INDENT# 'Pre-process request to handle mass action form for NotificationSetting' #NEWLINE# def wrap( request , * args , **kwargs ) : #NEWLINE# #INDENT# 'Wrap' #NEWLINE# user = request . user . profile #NEWLINE# if ( 'massform' in request . POST ) : #NEWLINE# #INDENT# for key in request . POST : #NEWLINE# #INDENT# if ( 'mass-setting' in key ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# report = NotificationSetting . objects . get ( pk = request . POST [ key ] ) #NEWLINE# form = MassActionForm ( user , request . POST , instance = report ) #NEWLINE# if ( form . is_valid ( ) and user . has_permission ( report , mode = 'w' ) ) : #NEWLINE# #INDENT# form . save ( ) #NEWLINE# #UNINDENT# #UNINDENT# except : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return f ( request , * args , ** kwargs ) #NEWLINE# #UNINDENT# wrap . __doc__ = f . __doc__ #NEWLINE# wrap . __name__ = f . __name__ #NEWLINE# return wrap