... . Explicit support for streaming responses Before Django 1.5, it was possible to create a streaming response by passing an iterator to HttpResponse . But this was unreliable: any middleware that accessed the content attribute would consume the iterator p ... streaming response with the new StreamingHttpResponse class. This class exposes a streaming_content attribute which is an iterator. Since StreamingHttpResponse does not have a content attribute, middleware that needs access to the response content must ... e used any longer. Streaming behavior of HttpResponse Django 1.5 deprecates the ability to stream a response by passing an iterator to HttpResponse . If you rely on this behavior, switch to StreamingHttpResponse . See Explicit support for streaming respo ... ... ion() queries ( #28781 ). Fixed incorrect index name truncation when using a namespaced db_table ( #28792 ). Made QuerySet.iterator() use server-side cursors on PostgreSQL after values() and values_list() ( #28817 ). Fixed crash on SQLite and MySQL when ... ... パフォーマンス上の問題が発生する可能性があります。使用するケースに応じて、常にプロファイルを分析してください! クエリの実行に iterator() を使用した場合、 prefetch_related() は chunk_size の値が指定されたときのみ呼び出されます。 Prefetch オブジェクトを使って ... と、空の辞書が返されます。 Changed in Django 6.1: Support for chaining in_bulk() after values() or values_list() was added. iterator() iterator ( chunk_size = None ) aiterator ( chunk_size = None ) 非同期バージョン : aiterator() Evaluates the QuerySet (by ... performing the query) and returns an iterator over the results, or an asynchronous iterator if you call its asynchronous version aiterator . A QuerySet typically caches ... ... that caused __in lookups on annotations to erroneously return empty querysets and __range lookups to crash when passed an iterator ( #37311 ). Fixed a bug in Django 6.1 where QuerySet.in_bulk() chained after QuerySet.values() or QuerySet.values_list() c ... ... r は削除されます。 リレーション先オブジェクトをプリフェッチするクエリセットに対して、 chunk_size 引数を提供せずに QuerySet.iterator() を使うことはできなくなります。 未保存のモデルインスタンスを関連フィルターに渡すことはできなくなります。 RemoteUserBacken ... the render_to_response() shortcut and the sitemap views, index() and sitemap() . When HttpResponse is instantiated with an iterator, or when content is set to an iterator, that iterator will be immediately consumed. The AUTH_PROFILE_MODULE setting, and t ... ... elChoiceField と ModelMultipleChoiceField には、選択肢を生成する際にクエリセットを繰り返すために使用されるクラスを指定する iterator 属性があります。詳細は、 リレーションシップの選択肢をイテレートする を参照してください。 ModelChoiceField class ModelChoic ... を決定します。デフォルトでは、 blank は False で、空の選択肢は作成されません。 ModelChoiceField には、以下の属性もあります: iterator queryset からフィールド選択肢を生成するために使用されるイテレータクラス。デフォルトでは、 ModelChoiceIterator です。 モデル ... な引数を取ります: to_field_name ModelChoiceField.to_field_name と同じです。 ModelMultipleChoiceField には次の属性もあります: iterator ModelChoiceField.iterator と同じです。 リレーションシップの選択肢をイテレートする デフォルトでは、 ModelChoiceField と Mod ... ... ... ring. On Oracle, AutoField and BigAutoField are now created as identity columns . The new chunk_size parameter of QuerySet.iterator() controls the number of rows fetched by the Python database client when streaming results from the database. For database ... end size is increased from 10M to 25M. To improve performance when streaming large result sets from the database, QuerySet.iterator() now fetches 2000 rows at a time instead of 100. The old behavior can be restored using the chunk_size parameter. For exa ... mple: Book . objects . iterator ( chunk_size = 100 ) Providing unknown package names in the packages argument of the JavaScriptCatalog view now raises Val ... ... a row insertion fails uniqueness constraints. This is supported on MariaDB, MySQL, PostgreSQL, and SQLite 3.24+. QuerySet.iterator() now supports prefetching related objects as long as the chunk_size argument is provided. In older versions, no prefetchi ... ontrib.sessions.serializers.PickleSerializer is deprecated due to the risk of remote code execution. The usage of QuerySet.iterator() on a queryset that prefetches related objects without providing the chunk_size argument is deprecated. In older versions ... ... is など) を追加する必要がある場合は、 CreateExtension オペレーションを使用してください。 サーバーサイド・カーソル QuerySet.iterator() を使うと、 Django は サーバーサイドカーソル をオープンします。デフォルトでは、PostgreSQL はカーソルクエリの結果の最初の1 ... トされていません。 SQLite は SELECT ... FOR UPDATE 構文をサポートしていません。これを呼び出しても何も起こりません。 QuerySet.iterator() を使用する際の分離の問題 QuerySet.iterator() を使用してテーブルをイテレートしながらテーブルを変更する場合、 Isolation In ... 2026年10月08日