I'm generating a combined report in Django by looping through several database entries and rendering the same HTML template multiple times, each with different data. The template includes Leaflet maps and some inline scripts.
The problem is: when I combine the reports into a single page, the layout breaks — it looks like the reports are either nested inside each other or overlapping. I also see multiple scrollbars (one inside another), which shouldn't happen. This only occurs when I render several reports together.
Each individual report works fine on its own. The issue only appears when I generate them together in a loop.