21 lines
No EOL
497 B
Python
21 lines
No EOL
497 B
Python
|
|
# Importing flask module in the project is mandatory
|
|
# An object of Flask class is our WSGI application.
|
|
from flask import Flask,redirect,url_for,request,render_template
|
|
|
|
# Flask constructor takes the name of
|
|
# current module (__name__) as argument.
|
|
app = Flask(__name__)
|
|
|
|
|
|
## WEB FRONTEND
|
|
@app.route('/')
|
|
def homepage():
|
|
return render_template("home.html", title="Homepage")
|
|
|
|
## API CALLS
|
|
|
|
# main driver function
|
|
if __name__ == '__main__':
|
|
# run app if executed directly
|
|
app.run() |