This commit is contained in:
Micik2 2018-12-19 02:37:23 +01:00
parent 7cabe6decd
commit e6bd0311ee

14
app.py
View File

@ -728,11 +728,15 @@ def resources():
#if 'file' not in request.files:
# flash('No file part')
# return redirect(request.url)
file = request.files['fileToUpload']
#file = request.form["fileToUpload"]
filename = secure_filename(file.filename)
file.save(os.path.join(app.config['UPLOAD_FOLDER'], filename))
return render_template('userHome.html', user=session['user'].split('@')[0], calendar_src="https://calendar.google.com/calendar/embed?src=" + session.get("user"))
if "fileToUpload" in request.files:
file = request.files['fileToUpload']
#file = request.form["fileToUpload"]
filename = secure_filename(file.filename)
file.save(os.path.join(app.config['UPLOAD_FOLDER'], filename))
return render_template('userHome.html', user=session['user'].split('@')[0], calendar_src="https://calendar.google.com/calendar/embed?src=" + session.get("user"))
else:
return redirect(url_for('toResources'))
@app.route('/showResources')
def showResources():