Skip to content

1.5.6.4 Hapus Data

David Rigan edited this page Feb 13, 2020 · 1 revision

Database session memiliki delete() method. Semisal kamu akan menghapus Moderator role dari database:

>>> db.session.delete(mod_role)
>>> db.session.commit()

Inget iya, setiap melakukan add() dan delete() semuanya harus di commit() untuk perubahan di database.

Clone this wiki locally