-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
58 lines (48 loc) · 1.44 KB
/
Copy pathapp.py
File metadata and controls
58 lines (48 loc) · 1.44 KB
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
49
50
51
52
53
54
55
56
57
58
from flask import Flask, render_template
app = Flask(__name__)
JOBS = [
{
'id': 1,
'title': 'Software Engineering Intern',
'company': 'TechCorp',
'location': 'San Francisco, CA',
'type': 'Internship',
'description': 'Join our team to build innovative software solutions.'
},
{
'id': 2,
'title': 'Data Science Fellow',
'company': 'DataLab',
'location': 'New York, NY',
'type': 'Fellowship',
'description': 'Work on cutting-edge machine learning projects.'
},
{
'id': 3,
'title': 'Product Design Intern',
'company': 'DesignHub',
'location': 'Remote',
'type': 'Internship',
'description': 'Create beautiful user experiences for millions of users.'
},
{
'id': 4,
'title': 'Research Assistant',
'company': 'University Lab',
'location': 'Boston, MA',
'type': 'Part-time',
'description': 'Assist professors with groundbreaking research projects.'
}
]
@app.route('/')
def home():
return render_template('index.html', jobs=JOBS)
@app.route('/job/<int:job_id>')
def job_detail(job_id):
job = next((j for j in JOBS if j['id'] == job_id), None)
return render_template('job.html', job=job)
@app.route('/about')
def about():
return render_template('about.html')
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000, debug=True)