diff --git a/docs/topics/db/sql.txt b/docs/topics/db/sql.txt index cac9a72530..2698bb0f04 100644 --- a/docs/topics/db/sql.txt +++ b/docs/topics/db/sql.txt @@ -226,6 +226,8 @@ alias:: from django.db import connections cursor = connections['my_db_alias'].cursor() + # Your code here... + transaction.commit_unless_managed(using='my_db_alias') .. _transactions-and-raw-sql: