Пример #1
0
 def report_subtitles(self):
     if self.is_rendered_as_email:
         program = self.request.GET.get('filter_by_program')
         products = self.request.GET.getlist('filter_by_product')
         return mark_safe("""
         <br>For Filters:<br>
         Location: {0}<br>
         Program: {1}<br>
         Product: {2}<br>
         Date range: {3} - {4}
         """.format(
             self.location.name,
             Program.get(program).name if program and program != ALL_OPTION else ALL_OPTION.title(),
             ", ".join(
                 [p.name for p in SQLProduct.objects.filter(product_id__in=products)]
             ) if products != ALL_OPTION and products else ALL_OPTION.title(),
             ews_date_format(self.datespan.startdate_utc),
             ews_date_format(self.datespan.enddate_utc)
         ))
     return None
Пример #2
0
 def report_subtitles(self):
     if self.is_rendered_as_email:
         program = self.request.GET.get('filter_by_program')
         products = self.request.GET.getlist('filter_by_product')
         return mark_safe("""
         <br>For Filters:<br>
         Location: {0}<br>
         Program: {1}<br>
         Product: {2}<br>
         Date range: {3} - {4}
         """.format(
             self.location.name,
             Program.get(program).name if program and program != ALL_OPTION
             else ALL_OPTION.title(), ", ".join([
                 p.name
                 for p in SQLProduct.objects.filter(product_id__in=products)
             ])
             if products != ALL_OPTION and products else ALL_OPTION.title(),
             ews_date_format(self.datespan.startdate_utc),
             ews_date_format(self.datespan.enddate_utc)))
     return None