per page, with , order by , clip by
Results of 1 - 10 of about 32 for filename (0.006 sec.)
Django 3.2.15 リリースノート 12581
Django 3.2.15 リリースノート 2022年8月3日 Django 3.2.15 では 3.2.14 における深刻度 "high" のセキュリティの問題を修正しました。 CVE-2022-36359: Potential reflected file download vulnerability in FileResponse An application may have been vuln ... erable to a reflected file download (RFD) attack that sets the Content-Disposition header of a FileResponse when the filename was derived from user-supplied input. The filename is now escaped to avoid this possibility. ...
https://man.mtool.work/django/6.1/releases/3.2.15.html
Django 4.0.7 リリースノート 12581
Django 4.0.7 リリースノート 2022年8月3日 Django 4.0.7 では 4.0.6 における深刻度 "high" のセキュリティの問題を修正しました。 CVE-2022-36359: Potential reflected file download vulnerability in FileResponse An application may have been vulnera ... ble to a reflected file download (RFD) attack that sets the Content-Disposition header of a FileResponse when the filename was derived from user-supplied input. The filename is now escaped to avoid this possibility. ...
https://man.mtool.work/django/6.1/releases/4.0.7.html
How to release Django 10745
How to release Django このドキュメントでは、Django のリリース方法について説明しています。 これらの手順を変更した場合は、最新の情報を保ってください! ここでのポイントは、規定を設けるのではなく、説明的であることです。自由に効率化したり、変更し ... m/<<RELEASE MANAGER GITHUB USERNAME>>.gpg | gpg --import - Once the key is imported, verify this file: gpg --verify <<THIS FILENAME>> Once you have verified this file, you can use normal MD5, SHA1, or SHA256 checksumming applications to generate the chec ... tarball/ https://www.djangoproject.com/download/<<VERSION>>/wheel/ MD5 checksums ============= <<MD5SUM>> <<RELEASE TAR.GZ FILENAME>> <<MD5SUM>> <<RELEASE WHL FILENAME>> SHA1 checksums ============== <<SHA1SUM>> <<RELEASE TAR.GZ FILENAME>> <<SHA1SUM>> << ... RELEASE WHL FILENAME>> SHA256 checksums ================ <<SHA256SUM>> <<RELEASE TAR.GZ FILENAME>> <<SHA256SUM>> <<RELEASE WHL FILENAME>> Sign ...
https://man.mtool.work/django/6.1/internals/howto-release-django.html
ファイルストレージ API 10342
ファイルストレージ API デフォルトのストレージクラスの取得 Djangoでは、デフォルトストレージクラスにアクセスするための便利な方法を提供しています。 storages STORAGES で定義されたエイリアスを使用してストレージインスタンスを取得できる、辞書ライク ... e ( name ) [ソース] name パラメータに基づいて、ターゲットのストレージシステムで使用に適したファイル名を返します。 generate_filename ( filename ) [ソース] Validates the filename by calling get_valid_name and returns a filename to be passed to the save() m ... ethod. The filename argument may include a path as returned by FileField.upload_to . In that case, the path won't be passed to get_valid_name ...
https://man.mtool.work/django/6.1/ref/files/storage.html
CSVを出力する 9311
CSVを出力する このドキュメントでは、Django のビューを使って動的に CSV (Comma Separated Values) を出力する方法を説明しています。そのためには、Python のCSV ライブラリか Django のテンプレートシステムを使います。 Python の CSV ライブラリを使う ... opriate CSV header. response = HttpResponse ( content_type = "text/csv" , headers = { "Content-Disposition" : 'attachment; filename="somefilename.csv"' }, ) writer = csv . writer ( response ) writer . writerow ([ "First row" , "Foo" , "Bar" , "Baz" ]) wr ... reamingHttpResponse ( stream_batched_rows (), content_type = "text/csv" , headers = { "Content-Disposition" : 'attachment; filename="somefilename.csv"' }, ) テンプレートシステムを使う もしくは、 Django のテンプレートシステム を使って CSV を生成することも ... opriate CSV header. response = HttpResponse ( content_type = "text/csv" , headers = { "Content-Disposition" : 'attachment; filename="somefilename.csv"' }, ) # The data is hardcoded here, but you could load it from a database or # some other source. csv_d ...
https://man.mtool.work/django/6.1/howto/outputting-csv.html
メールを送信する 9311
メールを送信する 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 ... of attachments to put on the message. Each can be an instance of MIMEPart or EmailAttachment , or a tuple with attributes (filename, content, mimetype) . Changed in Django 6.0: Support for MIMEPart objects in the attachments list was added. バージョン 6. ... t. If you add another way to specify recipients in your class, they need to be returned from this method as well. attach ( filename , content , mimetype ) [ソース] attach ( mimepart ) Creates a new attachment and adds it to the message. There are two way ... s to call attach() : You can pass it three arguments: filename , content and mimetype . filename is the name of the file attachment as it will appear in the email, content is the data t ...
https://man.mtool.work/django/6.1/topics/email.html
Django 1.10 リリースノート 8908
Django 1.10 リリースノート 2016年8月1日 Django 1.10 へようこそ! このリリースノートでは、 バージョン 1.10 の新機能 と、Django 1.9 以前からアップグレードする際に注意が必要な 後方互換性が失われた変更点 について説明します。私たちは、非推奨の期間 ... a timezone-aware datetime if USE_TZ is True and a naive datetime in the local timezone otherwise. The new Storage.generate_filename() method makes it easier to implement custom storages that don't use the os.path calls previously in FileField . フォーム ... or will need to implement it in the custom storage's save() method. Private FileField methods get_directory_name() and get_filename() are no longer called (and are now deprecated) which is a backwards incompatible change for users overriding those method ... s on custom fields. To adapt such code, override FileField.generate_filename() or Storage.generate_filename() instead. It might be possible to use upload_to also. The subject of mail sent by AdminEma ...
https://man.mtool.work/django/6.1/releases/1.10.html
ロギングの設定と利用 8715
ロギングの設定と利用 参考 Django のロギング リファレンス Django のロギングの概要 Django はそのままで動作する デフォルトのロギング設定 を持っており、すぐに拡張可能です。 基本的なロギング呼び出しを作成する ログメッセージをコード内から送信する ... 存する file という名前のハンドラを設定します: LOGGING = { # ... "handlers" : { "file" : { "class" : "logging.FileHandler" , "filename" : "general.log" , }, }, } Different handler classes take different configuration options. For more information on availab ... ラはすべてのレベルのログメッセージを受け取ります)。上の例を使うと、次のように書けます: { "class" : "logging.FileHandler" , "filename" : "general.log" , "level" : "DEBUG" , } これで、レベル DEBUG 以上のレコードだけを受け付けるようにハンドラを設定できます。 ... 適用するには、ハンドラの辞書に formatter エントリを追加します: "handlers" : { "file" : { "class" : "logging.FileHandler" , "filename" : "general.log" , "formatter" : "verbose" , }, } ロガーの名前空間を使う 無名のロギング設定 "" は任意の Python アプリケーシ ...
https://man.mtool.work/django/6.1/howto/logging.html
Django のセキュリティポリシー 8715
Django のセキュリティポリシー Django の開発チームは、セキュリティ関連の問題の責任ある報告と開示に強くコミットしています。そのため、私たちはその理想に従い、公式の Django ディストリビューション、およびサードパーティのディストリビューションにタ ... ut. This principle is explained in our security documentation . For example, the following is not considered valid because filename has not been sanitized: from django.core.files.storage import default_storage from django.http import HttpResponse def my_ ... proof_of_concept ( request ): filename = request . GET . get ( "filename" ) return HttpResponse ( default_storage . open ( f "user/ { filename } " )) Similarly, ...
https://man.mtool.work/django/6.1/internals/security.html
PDFファイルを作成する 8506
PDFファイルを作成する このドキュメントでは、Django のビューを使用して PDF ファイルを動的に出力する方法を説明します。これは、優れたオープンソースの Python PDF ライブラリ ReportLab により可能になっています。 PDF ファイルを動的に生成する利点は ... browsers # present the option to save the file. buffer . seek ( 0 ) return FileResponse ( buffer , as_attachment = True , filename = "hello.pdf" ) コードとコメントが自分自身の意味を説明しているはずですが、いくつかの点には言及しておくべきでしょう。 レスポ ... chment パラメータが省略された場合、ブラウザはPDFを扱うために設定されたプログラムやプラグインを使ってPDFを扱います。 任意の filename パラメータを指定できます。これはブラウザの "名前を付けて保存" ダイアログで使用されます。 ReportLab API にフックできます: c ...
https://man.mtool.work/django/6.1/howto/outputting-pdf.html
PREV 1 2 3 4 NEXT