... ries. select_for_update() requires a transaction ¶ Historically, queries that use select_for_update() could be executed in autocommit mode, outside of a transaction. Before Django 1.6, Django's automatic transactions mode allowed this to be used to lock re ... cords until the next write operation. Django 1.6 introduced database-level autocommit; since then, execution in such a context voids the effect of select_for_update() . It is, therefore, assumed now to be an ... s can be caused by including an app which expects global transactions (e.g. ATOMIC_REQUESTS set to True ), or Django's old autocommit behavior, in a project which runs without them; and further, such errors may manifest as data-corruption bugs. This change ... ... foreign keys to form instances when validating model formsets ( #25431 ). Allowed using ORM write methods after disabling autocommit with set_autocommit(False) ( #24921 ). Fixed the manage.py test --keepdb option on Oracle ( #25421 ). Fixed incorrect quer ... ノート 関連キーワード Fixed model queries migrations crash Made AssertionError foreign translation using list reverse values autocommit many リリースノート October fixes several bugs バグ 修正 development server autoreload クイック検索 Last update: 2026年10月 ... ... foreign keys to form instances when validating model formsets ( #25431 ). Allowed using ORM write methods after disabling autocommit with set_autocommit(False) ( #24921 ). Fixed the manage.py test --keepdb option on Oracle ( #25421 ). Fixed incorrect quer ... ーワード Fixed model queries migrations Django field crash Made AssertionError foreign translation using list reverse values autocommit set many リリースノート October 関連するページ Django 1.7.1 リリースノート Django 1.8.1 リリースノート Django 1.8.6 リリー ... ... ries. select_for_update() requires a transaction ¶ Historically, queries that use select_for_update() could be executed in autocommit mode, outside of a transaction. Before Django 1.6, Django's automatic transactions mode allowed this to be used to lock re ... cords until the next write operation. Django 1.6 introduced database-level autocommit; since then, execution in such a context voids the effect of select_for_update() . It is, therefore, assumed now to be an ... s can be caused by including an app which expects global transactions (e.g. ATOMIC_REQUESTS set to True ), or Django's old autocommit behavior, in a project which runs without them; and further, such errors may manifest as data-corruption bugs. This change ... ... tory ( #21581 ). Fixed mail encoding on Python 3.3.3+ ( #21093 ). Fixed an issue where when settings.DATABASES['default']['AUTOCOMMIT'] = False , the connection wasn't in autocommit mode but Django pretended it was. Fixed a regression in multiple-table inh ... ... tory ( #21581 ). Fixed mail encoding on Python 3.3.3+ ( #21093 ). Fixed an issue where when settings.DATABASES['default']['AUTOCOMMIT'] = False , the connection wasn't in autocommit mode but Django pretended it was. Fixed a regression in multiple-table inh ... ... do_stuff () and as a context manager : from django.db import transaction def viewfunc ( request ): # This code executes in autocommit mode (Django's default). do_stuff () with transaction . atomic (): # This code executes inside a transaction. do_more_stuf ... トランザクション管理 を無効にすることもできますが、推奨されません。 トランザクション管理を無効化する ¶ データベースの設定で AUTOCOMMIT を False にすると、Django のトランザクション管理を完全に無効にできます。こうすると、 Django は自動コミットを有効にせず、コ ... です)。 自動コミットモードで atomic() ブロックの外にある場合、関数はコミット時ではなく即座に実行されます。 on-commit 関数は autocommit mode と atomic() (または ATOMIC_REQUESTS ) トランザクション API でのみ動作します。オートコミットが無効でアトミックブロック ... ... do_stuff () and as a context manager : from django.db import transaction def viewfunc ( request ): # This code executes in autocommit mode (Django's default). do_stuff () with transaction . atomic (): # This code executes inside a transaction. do_more_stuf ... トランザクション管理 を無効にすることもできますが、推奨されません。 トランザクション管理を無効化する ¶ データベースの設定で AUTOCOMMIT を False にすると、Django のトランザクション管理を完全に無効にできます。こうすると、 Django は自動コミットを有効にせず、コ ... です)。 自動コミットモードで atomic() ブロックの外にある場合、関数はコミット時ではなく即座に実行されます。 on-commit 関数は autocommit mode と atomic() (または ATOMIC_REQUESTS ) トランザクション API でのみ動作します。オートコミットが無効でアトミックブロック ... ... range. It does check it now and raises an InvalidPage exception when the number is either too low or too high. Behavior of autocommit database option on PostgreSQL changed ¶ PostgreSQL's autocommit option didn't work as advertised previously. It did work f ... or single transaction block, but after the first block was left the autocommit behavior was never restored. This bug is now fixed in 1.5. While this is only a bug fix, it is worth checking your applica ... tions behavior if you are using PostgreSQL together with the autocommit option. Session not saved on 500 responses ¶ Django's session middleware will skip saving the session data if the response ... ... oject and app templates . Improved transaction management ¶ Django's transaction management was overhauled. Database-level autocommit is now turned on by default. This makes transaction handling more explicit and should improve performance. The existing AP ... emoval may appear as a backwards incompatible change. New transaction management model ¶ Behavior changes ¶ Database-level autocommit is enabled by default in Django 1.6. While this doesn't change the general spirit of Django's transaction management, ther ... n expected, check that the extra queries are related to savepoints, and adjust the expected number of queries accordingly. Autocommit option for PostgreSQL ¶ In previous versions, database-level autocommit was only an option for PostgreSQL, and it was disa ... 2026年10月08日