-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
28 lines (23 loc) · 642 Bytes
/
Copy pathapp.py
File metadata and controls
28 lines (23 loc) · 642 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# 1)import flask
# to render web page add template folder and an html file in that then render template
from flask import Flask,render_template
from data import Faculties
# initialise
app=Flask(__name__)
myFaculties=Faculties()
# declare routing
@app.route('/')
def index():
return "<hi>Welcome Vineeth</h1>";
@app.route('/login')
def login():
return render_template('index.html');
@app.route('/register')
def register():
return render_template('register.html')
@app.route('/faculty')
def faculty():
return render_template('faculty.html',facultyList=myFaculties)
# check
if(__name__=='__main__'):
app.run(debug=True);