Poprawki
This commit is contained in:
parent
7cabe6decd
commit
e6bd0311ee
14
app.py
14
app.py
@ -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():
|
||||
|
Loading…
Reference in New Issue
Block a user