1frompprintimportpformat 2 3frommarkupsafeimportMarkup,escape 4 5fromplain.httpimportResponse 6fromplain.views.exceptionsimportResponseException 7 8 9defdd(*objs):10"""11 Dump and die.1213 Dump the object and raise a ResponseException with the dump as the response content.14 """1516print(f"Dumping objects:\n{'\n'.join([pformat(obj)forobjinobjs])}")1718dump_strs=[19Markup("<pre><code>")+escape(pformat(obj))+Markup("</code></pre>")20forobjinobjs21]22combined_dump_str=Markup("\n\n").join(dump_strs)2324response=Response()25response.status_code=50026response.content=combined_dump_str27response.content_type="text/html"28raiseResponseException(response)