def process_response(self, request, response):
if response.status_code == <NUM_LIT> and not settings.DEBUG:<EOL><INDENT>domain = request.get_host()<EOL>path = request.get_full_path()<EOL>referer = force_text(<EOL>request.META.get('<STR_LIT>', '<STR_LIT>'), errors='<STR_LIT:replace>')<EOL>if not self.is_ignorable_request(request, path, domain, referer):<EOL><INDENT>ua = request.META.get('<STR_LIT>', '<STR_LIT>')<EOL>ip = request.META.get('<STR_LIT>', '<STR_LIT>')<EOL>user = None<EOL>if request.user and hasattr(request.user, '<STR_LIT:email>'):<EOL><INDENT>user = request.user.email<EOL><DEDENT>content = (<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>) % (referer, path, ua, ip, user)<EOL>if self.is_internal_request(domain, referer):<EOL><INDENT>internal = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>internal = '<STR_LIT>'<EOL><DEDENT>mail_managers(<EOL>"<STR_LIT>" % (<EOL>internal,<EOL>domain<EOL>),<EOL>content,<EOL>fail_silently=True)<EOL><DEDENT><DEDENT>return response<EOL>
Send broken link emails for relevant 404 NOT FOUND responses.