Update app.py
Browse files
app.py
CHANGED
@@ -9,6 +9,8 @@ import io
|
|
9 |
import base64
|
10 |
from matplotlib.ticker import FuncFormatter
|
11 |
from xhtml2pdf import pisa
|
|
|
|
|
12 |
|
13 |
app = Flask(__name__)
|
14 |
|
@@ -81,21 +83,25 @@ def index():
|
|
81 |
tabela_html = df.to_html(index=False, classes="table table-striped", float_format="R${:,.2f}".format)
|
82 |
|
83 |
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
|
|
|
|
|
|
|
|
99 |
|
100 |
return render_template("index.html")
|
101 |
|
|
|
9 |
import base64
|
10 |
from matplotlib.ticker import FuncFormatter
|
11 |
from xhtml2pdf import pisa
|
12 |
+
from datetime import datetime
|
13 |
+
|
14 |
|
15 |
app = Flask(__name__)
|
16 |
|
|
|
83 |
tabela_html = df.to_html(index=False, classes="table table-striped", float_format="R${:,.2f}".format)
|
84 |
|
85 |
|
86 |
+
|
87 |
+
|
88 |
+
|
89 |
+
html = render_template(
|
90 |
+
"relatorio_pdf.html",
|
91 |
+
capital=capital_inicial,
|
92 |
+
studio_ret=retorno_mensal_studio,
|
93 |
+
valorizacao=valorizacao_anual,
|
94 |
+
franquia_ret=lucro_anual_franquia,
|
95 |
+
acoes_ret=retorno_anual_acoes,
|
96 |
+
renda_fixa=retorno_anual_renda_fixa,
|
97 |
+
inflacao=inflacao_anual,
|
98 |
+
anos=anos,
|
99 |
+
tabela=tabela,
|
100 |
+
grafico=grafico_base64,
|
101 |
+
investimento_mais_valorizado=investimento_mais_valorizado,
|
102 |
+
valor_mais_alto=valor_mais_alto,
|
103 |
+
now=datetime.now()
|
104 |
+
)
|
105 |
|
106 |
return render_template("index.html")
|
107 |
|