diff --git a/bpeng/bis/report.py b/bpeng/bis/report.py index 369ecaf0ca8e0ae159d7e25177a8668c1a6c0c4e..6022fdf5eb5c6493b5abde4c49f3f24385130dfe 100644 --- a/bpeng/bis/report.py +++ b/bpeng/bis/report.py @@ -45,7 +45,7 @@ def duplicate_slide(pres, index): return dest -def generate_pns_report(building_info, recommendations): +def generate_pns_report(building_info, recommendations, region): """ Generate an PNS Report from dicts @@ -59,8 +59,10 @@ def generate_pns_report(building_info, recommendations): recs_per_slide = 3 total_recs = len(recommendations) num_recommendation_slides = math.ceil(float(total_recs)/recs_per_slide) + # Get the template name based on region + template_name = 'NON_NYC_PPTX_TEMPLATE_' if region == 2 else 'Milwaukee_PPTX_TEMPLATE_' # Select Template Based on the number of recommendations with a max of 12 recommendations - template_path = os.environ['NON_NYC_PPTX_TEMPLATE_' + str(num_recommendation_slides)] + template_path = os.environ[template_name + str(num_recommendation_slides)] report = TemplateInstantiator(template_path) # Provide template with address, date for title page address = building_info['address']