per page, with , order by , clip by
Results of 1 - 10 of about 10 for StreamingHttpResponse (0.011 sec.)
リクエストとレスポンスのオブジェクト 13783
リクエストとレスポンスのオブジェクト 簡単な概要 Django は、システムを通じてステータスを渡すために、リクエストとレスポンスのオブジェクトを使います。 あるページがリクエストされたとき、Django はリクエストに関するメタデータを含んだ HttpRequest ... トは、すぐに閉じられます。 レスポンスに対して、イテレータからクライアントにストリーミングさせる必要がある場合には、代わりに StreamingHttpResponse クラスを使う必要があります。 ヘッダーフィールドをセットする レスポンスでヘッダーフィールドを設定または削除するには、 HttpR ... トラクターメソッドに encoder パラメータを渡すことができます。 >>> response = JsonResponse ( data , encoder = MyJSONEncoder ) StreamingHttpResponse オブジェクト class StreamingHttpResponse [ソース] StreamingHttpResponse クラスは、Djangoからブラウザへのレスポンスをストリ ... ーミングするために使用されます。 高度な使用法 StreamingHttpResponse はやや高度です。アプリケーションを WSGI で同期的に、あるいは ASGI で非同期的に提供するかを知り、使用方法を適切に調整するこ ...
https://man.mtool.work/django/6.1/ref/request-response.html
CSVを出力する 9993
CSVを出力する このドキュメントでは、Django のビューを使って動的に CSV (Comma Separated Values) を出力する方法を説明しています。そのためには、Python のCSV ライブラリか Django のテンプレートシステムを使います。 Python の CSV ライブラリを使う ... イズの大きな CSV ファイルをストリーミングする 大きなサイズのレスポンスを生成するビューを取り扱うときには、代わりに Django の StreamingHttpResponse の使用を考えてみてください。例えば、生成に長時間を要するファイルをストリーミングことで、サーバーがレスポンスを生成している ... ve compression efficiency when used with GZipMiddleware : import csv from itertools import batched from django.http import StreamingHttpResponse class Echo : """An object that implements just the write method of the file-like interface. """ def write ( self , value ) ... atched_rows (): for batch in batched ( rows , 100 ): yield "" . join ( writer . writerow ( row ) for row in batch ) return StreamingHttpResponse ( stream_batched_rows (), content_type = "text/csv" , headers = { "Content-Disposition" : 'attachment; filename="somefilen ...
https://man.mtool.work/django/6.1/howto/outputting-csv.html
Django 1.5 リリースノート 9510
Django 1.5 リリースノート February 26, 2013 Django 1.5 へようこそ! These release notes cover the new features , as well as some backwards incompatible changes you'll want to be aware of when upgrading from Django 1.4 or older versions. We'v ... s can help in high-concurrency operations, and can improve performance. Better support for streaming responses via the new StreamingHttpResponse response class. GeoDjango now supports PostGIS 2.0. ... and more; see below . Wherever possible we try to introduce new fe ... ontent attribute would consume the iterator prematurely. You can now explicitly generate a streaming response with the new StreamingHttpResponse class. This class exposes a streaming_content attribute which is an iterator. Since StreamingHttpResponse does not have a ... precates 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 responses above. In Django 1.7 and above, the iterator will be consumed immediately b ...
https://man.mtool.work/django/6.1/releases/1.5.html
ミドルウェア (Middleware) 8885
ミドルウェア (Middleware) ミドルウェアは、Django のリクエスト/レスポンス処理にフックを加えるためのフレームワークです。これは、Django の入力あるいは出力をグローバルに置き換えるための、軽量で低レベルの「プラグイン」システムです。 各ミドルウェ ... 、 process_template_response() も含まれます。 ストリーミングレスポンス (streaming responses) を扱う HttpResponse とは違い、 StreamingHttpResponse は content 属性を持ちません。そのため、ミドルウェアはもはや、すべてのレスポンスが content 属性を持っていることを前提にする ... の方法は、次のようになります。 def wrap_streaming_content ( content ): for chunk in content : yield alter_content ( chunk ) StreamingHttpResponse は同期イテレータと非同期イテレータの両方を受け付けます。ラッピング関数は一致する必要があります。ミドルウェアがこの種のイテ ... レータをサポートする必要がある場合には、 StreamingHttpResponse.is_async 確認してください。 例外のハンドリング Django はビューまたはミドルウェアによって起こされた例外を、エラーステータス ...
https://man.mtool.work/django/6.1/topics/http/middleware.html
Coding style 8098
Coding style Please follow these coding standards when writing code for inclusion in Django. Pre-commit checks pre-commit is a framework for managing pre-commit hooks. These hooks help to identify simple issues before committing code for re ... jango from django.http import Http404 from django.http.response import ( Http404 , HttpResponse , HttpResponseNotAllowed , StreamingHttpResponse , cookie , ) # local Django from .models import LogEntry # try/except try : import yaml except ImportError : yaml = None C ...
https://man.mtool.work/django/6.1/internals/contributing/writing-code/coding-sty...
Django 6.1 release notes 7937
Django 6.1 release notes August 5, 2026 Welcome to Django 6.1! These release notes cover the new features , as well as some backwards incompatible changes you'll want to be aware of when upgrading from Django 6.0 or earlier. We've begun the ... now be pickled and unpickled. テスト assertContains() and assertNotContains() can now be called multiple times on the same StreamingHttpResponse . Previously, they would consume the streaming response's content, causing subsequent calls to fail. ユーティリティ parse_ ...
https://man.mtool.work/django/6.1/releases/6.1.html
Django ドキュメント目次 7776
Django ドキュメント目次 さぁ始めましょう Django の概要 モデルの設計 モデルのインストール 自動生成される API で楽しむ 作業場 (scaffold) ではなく完成品 (whole house) の、動的な admin インタフェース URL を設計する ビューの自作 テンプレートを設 ... オブジェクト 簡単な概要 HttpRequest オブジェクト QueryDict オブジェクト HttpResponse オブジェクト JsonResponse オブジェクト StreamingHttpResponse オブジェクト FileResponse オブジェクト HttpResponseBase クラス SchemaEditor メソッド 属性 設定 コアの設定 認証 メッセージ ...
https://man.mtool.work/django/6.1/contents.html
索引 7776
索引 記号 | _ | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | ア | イ | ク | コ | シ | ス | テ | ハ | ヒ | フ | メ | モ | ロ | 具 | 国 | 環 | 翻 | 表 | 言 | 長 記号 -- dbshell コマン ... ve() (SafeExceptionReporterFilter のメソッド) is_anonymous (models.AbstractBaseUser の属性) (models.User の属性) is_async (StreamingHttpResponse の属性) is_authenticated (models.AbstractBaseUser の属性) (models.User の属性) is_aware() (django.utils.timezone モジュール ... 性) ready (apps の属性) READY (TaskResultStatus の属性) ready() (AppConfig のメソッド) reason_phrase (HttpResponse の属性) (StreamingHttpResponse の属性) receive_data_chunk() (FileUploadHandler のメソッド) receiver() (django.dispatch モジュール) recipients() (EmailMes ...
https://man.mtool.work/django/6.1/genindex.html
Django 4.2 リリースノート 7776
Django 4.2 リリースノート 2023年4月3日 Django 4.2 へようこそ! このリリースノートでは、 バージョン 4.2 の新機能 と、Django 4.1 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。また、 一部の機能を非推奨 とし ... しているため、 CharField.max_length を設定する必要がなくなりました。 Request と Response DjangoがASGI経由で提供される場合、 StreamingHttpResponse は非同期イテレータをサポートするようになりました。 テスト test --debug-sql オプションは、SQLクエリを sqlparse でフォーマッ ...
https://man.mtool.work/django/6.1/releases/4.2.html
データベースのトランザクション 7776
データベースのトランザクション Django では、データベースのトランザクションをコントロールする方法が提供されています。 データベースのトランザクションを管理する Django のデフォルトのトランザクションの動作 Django のデフォルトの動作は、オートコミ ... だけうまくデータベースがロッキングを扱うかに依存します。 リクエストごとのトランザクションとストリーミングレスポンス ビューが StreamingHttpResponse を返すとき、レスポンスの内容読み出しが内容を生成するためのコードを実行することがあります。ビューはすでに返されているので、 ...
https://man.mtool.work/django/6.1/topics/db/transactions.html
PREV 1 NEXT