lets add the header

This commit is contained in:
Osman Faruk Bayram 2025-07-31 23:35:34 +03:00
parent 9a81594f4b
commit 5e4224fcd8

View file

@ -3,7 +3,6 @@ import json
from pathlib import Path from pathlib import Path
from flask import Flask, render_template_string, Response from flask import Flask, render_template_string, Response
import pandas as pd import pandas as pd
from datetime import datetime
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import seaborn as sns import seaborn as sns
import matplotlib import matplotlib
@ -113,7 +112,9 @@ def index():
# sort by date string # sort by date string
df.sort_values(by='date', inplace=True) df.sort_values(by='date', inplace=True)
return render_html(df) response = Response(render_html(df), content_type='text/html')
response.headers['Widget-Content-Type'] = 'html'
return response
@app.route('/health') @app.route('/health')
def health(): def health():