SHARE
TWEET

Parse HTML-JSON

a guest Sep 20th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import html
  2.  
  3. rendered = render_to_string("notifications/contract.html", context)
  4. string =html.escape(rendered)
  5. payload ={
  6.             "to": ",".join(emails),
  7.             "subject": "Nuevo contrato ID:{}".format(instance.id),
  8.             "body": "{}".format(string)
  9.             }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top