Update functions.py
Browse files- functions.py +7 -7
functions.py
CHANGED
|
@@ -74,21 +74,21 @@ def get_report_sections(report_type):
|
|
| 74 |
|
| 75 |
def generate_all_sections(data):
|
| 76 |
"""
|
| 77 |
-
Generate all sections for the specified report type
|
| 78 |
"""
|
|
|
|
|
|
|
| 79 |
# Retrieve sections based on report type
|
| 80 |
report_sections = get_report_sections(data.get("report_type"))
|
| 81 |
|
| 82 |
-
# Loop through each section and generate content
|
| 83 |
-
for section_name, function_name in report_sections:
|
| 84 |
# Call the respective function dynamically
|
| 85 |
section_content = call_dynamic_function(function_name, data)
|
| 86 |
|
| 87 |
-
#
|
| 88 |
-
|
| 89 |
-
|
|
|
|
| 90 |
|
| 91 |
-
# No need to return anything; just display results
|
| 92 |
|
| 93 |
|
| 94 |
# Define the actual generation functions, like:
|
|
|
|
| 74 |
|
| 75 |
def generate_all_sections(data):
|
| 76 |
"""
|
| 77 |
+
Generate all sections for the specified report type.
|
| 78 |
"""
|
| 79 |
+
sections_content = {}
|
| 80 |
+
|
| 81 |
# Retrieve sections based on report type
|
| 82 |
report_sections = get_report_sections(data.get("report_type"))
|
| 83 |
|
|
|
|
|
|
|
| 84 |
# Call the respective function dynamically
|
| 85 |
section_content = call_dynamic_function(function_name, data)
|
| 86 |
|
| 87 |
+
# Store the generated content in a dictionary
|
| 88 |
+
sections_content[section_name] = section_content
|
| 89 |
+
|
| 90 |
+
return sections_content
|
| 91 |
|
|
|
|
| 92 |
|
| 93 |
|
| 94 |
# Define the actual generation functions, like:
|