|
@@ -35,7 +35,7 @@ def home():
|
|
|
text=True
|
|
text=True
|
|
|
)
|
|
)
|
|
|
# clean up
|
|
# clean up
|
|
|
- p2 = sp.run(f'rm app/static/generated/{ralphanum}.csv', shell=True)
|
|
|
|
|
|
|
+ p2 = sp.run(f'rm app/static/generated/*', shell=True)
|
|
|
return redirect(p1.stdout, code=302)
|
|
return redirect(p1.stdout, code=302)
|
|
|
|
|
|
|
|
# initialize dictionary of bookmarks and groups
|
|
# initialize dictionary of bookmarks and groups
|
|
@@ -60,6 +60,7 @@ def home():
|
|
|
passwdc = request.form.get('password_confirm')
|
|
passwdc = request.form.get('password_confirm')
|
|
|
new_pic = request.files.get('profile_image')
|
|
new_pic = request.files.get('profile_image')
|
|
|
dl_bookml = request.form.get('dl_bookml')
|
|
dl_bookml = request.form.get('dl_bookml')
|
|
|
|
|
+ delbm = request.form.get('web_delete')
|
|
|
|
|
|
|
|
if username:
|
|
if username:
|
|
|
nusern_dbcall = User.query.filter_by(id=current_user.id).first()
|
|
nusern_dbcall = User.query.filter_by(id=current_user.id).first()
|
|
@@ -89,6 +90,15 @@ def home():
|
|
|
flash('Profile Pic updated!', category='success')
|
|
flash('Profile Pic updated!', category='success')
|
|
|
elif dl_bookml:
|
|
elif dl_bookml:
|
|
|
return generate_csv()
|
|
return generate_csv()
|
|
|
|
|
+ elif delbm:
|
|
|
|
|
+ bmq = Bookmark.query.get(delbm)
|
|
|
|
|
+ if bmq:
|
|
|
|
|
+ if bmq.owner == current_user.id:
|
|
|
|
|
+ db.session.delete(bmq)
|
|
|
|
|
+ db.session.commit()
|
|
|
|
|
+ flash('Bookmark deleted!', category='success')
|
|
|
|
|
+ return redirect(url_for('logic.home'))
|
|
|
|
|
+
|
|
|
|
|
|
|
|
return render_template('home.html', user=current_user, bdic=bb_dic)
|
|
return render_template('home.html', user=current_user, bdic=bb_dic)
|
|
|
|
|
|