another large clean up of code, all POSTs are now using make_response() and returning json OR are for a form that flask handles with rendering direct html. Where there is a POST with json response, the jscript now calls CheckForJobs() to show it in the F/E. Removed several debugs. Fixed up undocumented BUG where import datetime was wrong, and prefix/suffix also to offer directories near the date of an image. Removed unused routes for clearing messages

This commit is contained in:
2023-01-12 16:47:43 +11:00
parent 8d9cf5279e
commit ef9f26189a
12 changed files with 45 additions and 58 deletions

View File

@@ -100,7 +100,6 @@ def settings():
from job import SetFELog
s = Settings.query.one()
if 'submit' in request.form:
SetFELog("Successfully Updated Settings" )
s.import_path = request.form['import_path']
s.storage_path = request.form['storage_path']
s.recycle_bin_path = request.form['recycle_bin_path']
@@ -118,7 +117,8 @@ def settings():
s.scheduled_bin_cleanup = request.form['scheduled_bin_cleanup']
s.bin_cleanup_file_age = request.form['bin_cleanup_file_age']
s.job_archive_age = request.form['job_archive_age']
db.session.commit()
SetFELog("Successfully Updated Settings" )
db.session.commit()
return redirect( url_for( 'settings' ) )
except SQLAlchemyError as e:
SetFELog( f"<b>Failed to modify Setting:</b>&nbsp;{e.orig}", "danger" )