Skip to content

aarahman7/PythonFlaskSampleWebApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

To make a method an API method, we need to use @app.route()

@app.route('/getStudent', methods=['GET','POST'])

The html file should come under template folder. To call the html file from the method, we need to use
render_template('index.html')
To send any information to the html file, we need to use name attribute.
render_template('homepage.html',username="Ahamed")
In html file, we use to use this username with double curly braces
Hello {{username}}!
To get to know the current API method whether GET, POST, PUT, DELETE, we need to use:
if request.method == 'POST':

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published