diff --git a/settings.py b/settings.py index f86154d..a82e812 100644 --- a/settings.py +++ b/settings.py @@ -15,9 +15,10 @@ class Settings(db.Model): id = db.Column(db.Integer, db.Sequence('settings_id_seq'), primary_key=True ) import_path = db.Column(db.String) storage_path = db.Column(db.String) + recycle_bin_path = db.Column(db.String) def __repr__(self): - return f"" + return f"" ################################################################################ # Helper class that inherits a .dump() method to turn class Settings into json / useful in jinja2 @@ -37,6 +38,7 @@ class SettingsForm(FlaskForm): id = HiddenField() import_path = StringField('Path(s) to import from:', [validators.DataRequired()]) storage_path = StringField('Path to store sorted images to:', [validators.DataRequired()]) + recycle_bin_path = StringField('Path to temporarily store deleted images in:', [validators.DataRequired()]) submit = SubmitField('Save' ) ################################################################################ @@ -57,6 +59,7 @@ def settings(): st.SetMessage("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'] db.session.commit() return redirect( '/settings' ) except SQLAlchemyError as e: