week_inc = '%.1f' % district_data['week_incidence']
print('<td>')
print(new_infections)
- if district == sum_district:
- print('<details open><summary></summary><table>')
- else:
- print('<details><summary></summary><table>')
+ if district != sum_district:
+ print('<details><summary></summary>')
+ print('<table>')
print('<tr><th>%s</th><td>%s</td></tr>' % (long_wsum, week_sum))
print('<tr><th>%s</th><td>%s</td></tr>' % (long_wavg, week_avg))
print('<tr><th>%s</th><td>%s</td></tr>' % (long_winc, week_inc))
- print('</table></details>')
+ print('</table>')
+ if district != sum_district:
+ print('</details>')
print('</td>')
print('</tr>')
print('</table>')