Z
Z
Zorgios2021-09-13 12:30:50
Flask
Zorgios, 2021-09-13 12:30:50

How to pass parameters to the main (home) page of the admin panel?

The template for generating the home page of the administrative panel according to the standard is located on the path
'templates/admin/index.html'

How to pass parameters from FLASK to it?
For example, the parameter To make it appear on the main page as a result of templates/admin/index.html
test_param = 'test_text'

<h1>Home page</h1>
{{ test_param }}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Emil Revencu, 2021-10-19
@Revencu

render_template("admin/index.html", test_param=your_value)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question