#NEWLINE# def deliver_hook( self , instance , payload_override = None ) : #NEWLINE# #INDENT# '\n        Deliver the payload to the target URL.\n\n        By default it serializes to JSON and POSTs.\n        ' #NEWLINE# payload = ( payload_override or self . serialize_hook ( self ) ) #NEWLINE# if getattr ( settings , 'HOOK_DELIVERER' , None ) : #NEWLINE# #INDENT# deliverer = get_module ( settings . HOOK_DELIVERER ) #NEWLINE# deliverer ( self . target , payload , instance = instance , hook = self ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# client . post ( url = self . target , data = json . dumps ( payload , cls = serializers . json . DjangoJSONEncoder ) , headers = { #NEWLINE# #INDENT# 'Content-Type' : 'application/json' , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# signals . hook_sent_event . send_robust ( sender = self . __class__ , payload = payload , instance = instance , hook = self ) #NEWLINE# return None