def send_alert(request, message=None, url=None, code='soft-eol'):
 if (url is None):
  url = request.registry.settings['project_docs']
 request.response.headers['Alert'] = encode_header(json.dumps({'code': code, 'message': message, 'url': url}))

def send_alert ( request , message = None , url = None , code = 'soft-eol' ) : if ( url is None ) : url = request . registry . settings [ 'project_docs' ] request . response . headers [ 'Alert' ] = encode_header ( json . dumps ( { 'code' : code , 'message' : message , 'url' : url } ) )
this sends an email alert .