Information Passing between your Frontend and Backend (PART TWO).

PURPOSE

To pass dynamic information from the server to the front end. [Jinja Templating]

The Author assumes that you have read [PART ONE] of this blog and have basic understanding of integrating HTML with Flask.

Sending Information from Flask Server to HTML.

Python/Flask

Modify your main app.py file like so:

HTML

Create an about.html file in your templates directory

Add the following to it:


Run the app.py file:

  • Now, visit localhost:5000 on your browser, you will see the form just created in index.html
  • Fill up the information and hit the submit button.
  • Marvel at simple yet beautiful HTML you created.

Next Blog: How to render Dynamic Data to your webpage (Part TWo)

Thank the author. Fork this blog.


Tagged in flask