def connects(): try: attempt = DanSQL() attempt.off() return True except: return False
if int(action) == 1: list = DanSQL().get( f"SELECT * from sales WHERE date='{selection}';") msg = f'Not Dan, POST{action}, {selection}' return render_template('mastersales.html', title='HR edit', form=grab_data, list=list, user=user, message=msg) elif int(action) == 2: DanSQL().write(f"DELETE from sales WHERE date='{selection}';") msg = 'Enty deleted successfully' return render_template('mastersales.html', title='HR edit', form=grab_data, list=list, user=user, message=msg) """ Here the app runs and lives not to touch leave alone logic above """ if __name__ == '__main__': app.run(port=5500, host='0.0.0.0', debug=True) MySQL.off()