def delete_product(id): deleted = Products.delete_by_id(id) if deleted: flash('Product successfully deleted', 'success') return redirect(url_for('products_reports')) else: flash('product not found', 'danger') return redirect(url_for('products_reports'))
def delete(id): deleted = Products.delete_by_id(id) if deleted: flash("Deleted Succesfully", 'success') return redirect(url_for('products_all')) else: flash("Record not found", 'danger') return redirect(url_for('products_all'))