#NEWLINE# def reject_by( self , user , reason = '' ) : #NEWLINE# #INDENT# if ( not self . allows_reject_by ( user ) ) : #NEWLINE# #INDENT# raise NominationRejectNotAllowedException ( ) #NEWLINE# #UNINDENT# self . rejected_by = user #NEWLINE# self . rejected_reason = reason #NEWLINE# nomination_will_be_rejected . send ( sender = self . __class__ , nomination = self ) #NEWLINE# self . save ( ) #NEWLINE# nomination_was_rejected . send ( sender = self . __class__ , nomination = self ) #NEWLINE# if notification : #NEWLINE# #INDENT# if self . badge . creator : #NEWLINE# #INDENT# notification . send ( [ self . badge . creator ] , 'nomination_rejected' , dict ( nomination = self , protocol = DEFAULT_HTTP_PROTOCOL ) ) #NEWLINE# #UNINDENT# if self . creator : #NEWLINE# #INDENT# notification . send ( [ self . creator ] , 'nomination_rejected' , dict ( nomination = self , protocol = DEFAULT_HTTP_PROTOCOL ) ) #NEWLINE# #UNINDENT# #UNINDENT# return self