#NEWLINE# def handle_get( self ) : #NEWLINE# #INDENT# ct = ContentType . objects . get ( pk = self . kwargs [ 'content_type' ] ) #NEWLINE# obj = ct . model_class ( ) . objects . get ( pk = self . kwargs [ 'pk' ] ) #NEWLINE# self . connection . warnings . reset ( ) #NEWLINE# if obj . mailchimp_test ( self . connection , self . request ) : #NEWLINE# #INDENT# self . message_success ( ( 'A Test Campaign has been sent to your email address (%s).' % self . request . user . email ) ) #NEWLINE# for ( message , category , filename , lineno ) in self . connection . warnings . get ( ) : #NEWLINE# #INDENT# self . message_warning ( ( '%s: %s' % ( category . __name__ , message ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . message_error ( 'And error has occured while trying to send the test mail to you, please try again later' ) #NEWLINE# #UNINDENT# return self . json ( True )