-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
55 lines (43 loc) · 1.31 KB
/
Copy pathapp.py
File metadata and controls
55 lines (43 loc) · 1.31 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
from flask import Flask, render_template, request, redirect, url_for,flash
import os
import resumeMatcher
# UPLOAD_FOLDER = '/path/to/the/uploads'
ALLOWED_EXTENSIONS = {'zip'}
app = Flask(__name__)
app.secret_key =os.urandom(12)
@app.route('/')
def index():
return render_template("index.html")
@app.route('/fileUpload.html')
def upload():
return render_template("fileUpload.html")
@app.route('/index.html')
# @exception_handler
def indexRedirect():
return render_template("index.html")
@app.route('/about.html')
def about():
return render_template("about.html")
@app.route('/services.html')
def services():
return render_template("services.html")
@app.route('/feedback.html')
def feedback():
return render_template("feedback.html")
@app.route('/contact.html')
def contact():
return render_template("contact.html")
@app.route('/file', methods=['GET', 'POST'])
def handleFileUpload():
if request.method == "POST":
file=request.files['uploadResume']
email=request.form['email']
if file.filename != '':
filePath=os.path.join('./UploadedResume',file.filename)
file.save(filePath)
if len(email)>0:
resumeMatcher.process(filePath,email)
flash("Email Has been sent!")
return render_template('index.html')
if __name__ == '__main__':
app.run(debug=True)