-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp2.py
More file actions
46 lines (33 loc) · 1.34 KB
/
app2.py
File metadata and controls
46 lines (33 loc) · 1.34 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
from flask import Flask, request, render_template
app = Flask(__name__)
@app.route('/')
def index():
return render_template('onboarding.html')
@app.route('/submit', methods=['POST'])
def submit():
name = request.form.get('name')
email = request.form.get('email')
phone = request.form.get('phone')
skills = request.form.getlist('skills')
work_experience = []
education = []
job_titles = request.form.getlist('job_title[]')
company_names = request.form.getlist('company_name[]')
years_worked = request.form.getlist('years_worked[]')
degrees = request.form.getlist('degree[]')
institutions = request.form.getlist('institution[]')
years_attended = request.form.getlist('years_attended[]')
for job_title, company_name, years in zip(job_titles, company_names, years_worked):
work_experience.append([job_title, company_name, years])
for degree, institution, years in zip(degrees, institutions, years_attended):
education.append([degree, institution, years])
# Print to console or handle the data as needed
print("Name:", name)
print("Email:", email)
print("Phone:", phone)
print("Skills:", skills)
print("Work Experience:", work_experience)
print("Education:", education)
return "Form submitted successfully!"
if __name__ == '__main__':
app.run(debug=True)