-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
48 lines (42 loc) · 983 Bytes
/
app.py
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
from flask import Flask, render_template,jsonify
app=Flask(__name__)
@app.route('/act')
def action():
return 'Hello there!'
JOBS=[
{
'id':1,
'title':'Data Analyst',
'Location':'Bengaluru,India',
'salary':'Rs. 10,00,000'
},
{
'id':2,
'title':'Data Scienst',
'Location':'New delhi,India',
'salary':'Rs. 12,00,000'
},
{
'id':3,
'title':'Backend Engineer',
'Location':'Remote',
'salary':'Rs. 30,00,000'
},
{
'id':4,
'title':'Frontend Engineer',
'Location':'Pune,India',
'salary':'Rs. 23,00,000'
}
]
@app.route('/')
def hello_world():
return render_template('home.html',jobs=JOBS)
@app.route("/jobs")
def list_jobs():
return jsonify(JOBS)
@app.route('/contact')
def contact():
return render_template('contact.html')
if __name__ == '__main__':
app.run(debug=True)