def email(self, request, pk=None):
        """
        This method produces the body of email notification for the build.
        By default it uses the project settings for HTML and template.
        These settings can be overwritten by using GET parameters:
         * output - sets the output format (text/plan, text/html)
         * template - sets the template used (id of existing template or
                      "default" for default SQUAD templates)
         * force - force email report re-generation even if there is
                   existing one cached
        """
        force = request.query_params.get("force", False)
        delayed_report, created = self.__return_delayed_report(request)
        if created or force:
            delayed_report = prepare_report(delayed_report.pk)
        if delayed_report.status_code != status.HTTP_200_OK:
            return Response(yaml.safe_load(delayed_report.error_message or ''), delayed_report.status_code)
        if delayed_report.output_format == "text/html" and delayed_report.output_html:
            return HttpResponse(delayed_report.output_html, content_type=delayed_report.output_format)
        return HttpResponse(delayed_report.output_text, content_type=delayed_report.output_format)
def email ( self , request , pk = None ) : force = request . query_params . get ( "force" , False ) delayed_report , created = self . __return_delayed_report ( request ) if created or force : delayed_report = prepare_report ( delayed_report . pk ) if delayed_report . status_code != status . HTTP_200_OK : return Response ( yaml . safe_load ( delayed_report . error_message or '' ) , delayed_report . status_code ) if delayed_report . output_format == "text/html" and delayed_report . output_html : return HttpResponse ( delayed_report . output_html , content_type = delayed_report . output_format ) return HttpResponse ( delayed_report . output_text , content_type = delayed_report . output_format )
This method produces the body of email notification for the build.
        By default it uses the project settings for HTML and template.
        These settings can be overwritten by using GET parameters:
         * output - sets the output format (text/plan, text/html)
         * template - sets the template used (id of existing template or
                      "default" for default SQUAD templates)
         * force - force email report re-generation even if there is
                   existing one cached