per page, with , order by , clip by
Results of 1 - 10 of about 15 for stream (0.005 sec.)
Django 1.4.19 リリースノート 13392
Django 1.4.19 リリースノート January 27, 2015 Django 1.4.19 fixes a regression in the 1.4.18 security release. バグ修正 GZipMiddleware now supports streaming responses. As part of the 1.4.18 security release, the django.views.static.serve() ... function was altered to stream the files it serves. Unfortunately, the GZipMiddleware consumed the stream prematurely and prevented files from being serv ...
https://man.mtool.work/django/6.1/releases/1.4.19.html
Django オブジェクトのシリアライズ 12417
Django オブジェクトのシリアライズ Django のシリアライズフレームワークは、Django のモデルを他のフォーマットに「翻訳」する仕組みを提供します。通常、このような他のフォーマットはテキストベースや Django データをネットワーク越しに送信するために使 ... したい場合に便利です。 with open ( "file.json" , "w" ) as out : json_serializer . serialize ( SomeModel . objects . all (), stream = out ) 注釈 get_serializer() を未知の フォーマット で呼び出すと、 django.core.serializers.SerializerDoesNotExist 例外が発 ... : fields = [ field . name for field in apps . get_model ( model ) . _meta . fields ] header = "," . join ( fields ) self . stream . write ( f "model, { header } \n " ) self . stream . write ( f " { dumped_object_str } \n " ) def getvalue ( self ): retu ... thon . Serializer , self ) . getvalue () class Deserializer ( serializers . python . Deserializer ): def __init__ ( self , stream_or_string , ** options ): if isinstance ( stream_or_string , bytes ): stream_or_string = stream_or_string . decode () if i ...
https://man.mtool.work/django/6.1/topics/serialization.html
CSVを出力する 8969
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 ): """Write the value by returning it, instead of storing in a buffer.""" return value def some_streaming_csv_view ( request ): """A view that streams a large CSV file.""" # Generate a sequence of rows. The range is based on ...
https://man.mtool.work/django/6.1/howto/outputting-csv.html
LayerMapping データインポートユーティリティ 8969
LayerMapping データインポートユーティリティ LayerMapping クラスは、ベクトル空間データファイル (例: shapefile) の内容を GeoDjango モデルにマッピングする方法を提供します。 このユーティリティは、ベクターレイヤーからジオメトリとフィールドを取り ... キーワード引数 LayerMapping. save ( verbose = False , fid_range = False , step = False , progress = False , silent = False , stream = sys.stdout , strict = False ) [ソース] The save() method also accepts keywords. These keywords are used for controlling ... 間隔で発生します。たとえば、 step=1000 の場合、1,000個目のフィーチャー、2,000個目のフィーチャーなどでコミットが行われます。 stream Status information will be written to this file handle. Defaults to using sys.stdout , but any object with a write method ...
https://man.mtool.work/django/6.1/ref/contrib/gis/layermapping.html
メールを送信する 8586
メールを送信する Django provides wrappers for Python's email and smtplib modules to simplify composing and sending email. Django's email framework also supports swapping in different delivery mechanisms: you can direct email to the console ... ツは文字列であることが期待されます。バイナリデータはUTF-8でデコードされ、それが失敗した場合、MIMEタイプは application/octet-stream に変更され、データは変更されずに添付されます。 Or for attachments requiring additional headers or parameters, you can pass ... To use it, set BACKEND to "django.core.mail.backends.console.EmailBackend" . The console backend supports these OPTIONS : "stream" : a stream-like object to write to. Defaults to stdout . "fail_silently" : set to True to ignore all errors while writing ... the message to the stream, including errors serializing the message. (This option is available for backward compatibility but is not recommended.) こ ...
https://man.mtool.work/django/6.1/topics/email.html
Django のリリースプロセス 8394
Django のリリースプロセス フィーチャーリリース Feature releases contain new features, improvements to existing features, and other enhancements. Each version will be mostly backwards compatible with the previous release. Exceptions to this ... e are no separate LTS releases. All feature releases receive security and data loss fixes for three years: one year of mainstream support followed by two years of extended support. See the annual release cycle for more details. See the download page fo ... s, to be released in the A.B+1 cycle. Translation string freeze / Release candidate release If there is still a consistent stream of release blockers coming in at the planned release candidate date, a beta 2 will be released to encourage further testin ... g a feature ガイドも参照してください。 サポートバージョン Each feature release series goes through two support phases: Mainstream support lasts one year, until the next feature release. During this time, patches applied to main are also applied to the ...
https://man.mtool.work/django/6.1/internals/release-process.html
アップロードファイルとアップロードハンドラ 8394
アップロードファイルとアップロードハンドラ アップロードファイル class UploadedFile [ソース] ファイルアップロード中、実際のファイルデータは request.FILES に保存されます。この辞書の各エントリーは UploadedFile オブジェクト(またはそのサブクラス ... e のサブクラスには以下が含まれます: class TemporaryUploadedFile [ソース] 一時的な場所にアップロードされたファイル (つまり、stream-to-disk)。このクラスは、 TemporaryFileUploadHandler によって使用されます。 UploadedFile のメソッドに加えて、1つの追加メソッ ... ードされたファイルの完全なパスを返します。 class InMemoryUploadedFile [ソース] メモリへのアップロードされたファイル(つまり、stream-to-memory)。このクラスは MemoryFileUploadHandler によって使用されます。 ビルトインのアップロードハンドラ MemoryFileUploadH ...
https://man.mtool.work/django/6.1/ref/files/uploads.html
Django 1.11 リリースノート 8202
Django 1.11 リリースノート April 4, 2017 Django 1.11 へようこそ! このリリースノートでは、Django 1.10 および過去のバージョンからアップグレードする際に知っておくべきいくつかの 後方互換性のない変更 に加え、 新機能 を説明しています。 いくつかの ... ムゾーンで送信できるようになりました。 EmailMessage.attach() and attach_file() now fall back to MIME type application/octet-stream when binary content that can't be decoded as UTF-8 is specified for a text/* attachment. ファイルストレージ io.TextIOWrapp ... iddleware now adds the ETag header to responses. シリアライズ (シリアル化) The new django.core.serializers.base.Serializer.stream_class attribute allows subclasses to customize the default stream. The encoder used by the JSON serializer can now be cust ... od to allow usage of server-side cursors on backends that support it. Dropped support for PostgreSQL 9.2 and PostGIS 2.0 Upstream support for PostgreSQL 9.2 ends in September 2017. As a consequence, Django 1.11 sets PostgreSQL 9.3 as the minimum versio ...
https://man.mtool.work/django/6.1/releases/1.11.html
PDFファイルを作成する 8011
PDFファイルを作成する このドキュメントでは、Django のビューを使用して PDF ファイルを動的に出力する方法を説明します。これは、優れたオープンソースの Python PDF ライブラリ ReportLab により可能になっています。 PDF ファイルを動的に生成する利点は ... て自動的にMIMEタイプ application/pdf を設定します。これはブラウザに、ドキュメントがHTMLファイルや一般的な application/octet-stream バイナリコンテンツではなく、PDFファイルであることを伝えます。 as_attachment=True が FileResponse に渡されると、適切な Cont ...
https://man.mtool.work/django/6.1/howto/outputting-pdf.html
テストツール 8011
テストツール Django は、テストを書くのに便利なツールをいくつか提供しています。 There are community-maintained solutions! Django has a vibrant ecosystem. There are testing and fixtures solutions highlighted on the Community Ecosystem page. T ... ラメータを含みます。ただし、メッセージボディは返されません。 options ( path , data = '' , content_type = 'application/octet-stream' , follow = False , secure = False , * , headers = None , query_params = None , ** extra ) [ソース] 与えられた path に対し ... よび extra パラメータは、 Client.get() の場合と同様に動作します。 put ( path , data = '' , content_type = 'application/octet-stream' , follow = False , secure = False , * , headers = None , query_params = None , ** extra ) [ソース] 与えられた path に対し ... extra パラメータは、 Client.get() の場合と同様に動作します。 patch ( path , data = '' , content_type = 'application/octet-stream' , follow = False , secure = False , * , headers = None , query_params = None , ** extra ) [ソース] 与えられた path に対し ...
https://man.mtool.work/django/6.1/topics/testing/tools.html
PREV 1 2 NEXT