per page, with , order by , clip by
Results of 1 - 10 of about 119 for content (0.004 sec.)
コンテンツセキュリティポリシー 11985
コンテンツセキュリティポリシー New in Django 6.0. Content Security Policy (CSP) is a web security standard that helps prevent content injection attacks by restricting the sources from which content can be loaded. It plays an important role ... ons in a Django project, see the Using CSP documentation. For an HTTP guide about CSP, see the MDN Guide on CSP . 概要 The Content-Security-Policy specification defines two complementary headers: Content-Security-Policy : Enforces the CSP policy, blocki ... ng content that violates the defined directives. Content-Security-Policy-Report-Only : Reports CSP violations without blocking conten ... omposed of one or more directives and their values, which together instruct the browser on how to handle specific types of content. When the ContentSecurityPolicyMiddleware is enabled, Django automatically builds and attaches the appropriate headers to ...
https://man.mtool.work/django/6.1/ref/csp.html
TemplateResponse および SimpleTemplateResponse 11574
TemplateResponse および SimpleTemplateResponse 標準の HttpResponse オブジェクトは静的な構造体です。構築時にあらかじめレンダリングされたコンテンツのブロックが提供され、そのコンテンツは変更可能ですが、簡単に変更できる形ではありません。 しかし ... するときに使用するコンテキストデータ。 これは dict でなければなりません。 例: {'foo': 123} SimpleTemplateResponse. rendered_content [ソース] 現在のテンプレートとコンテキストデータを使ってレンダリングされた、レスポンスコンテンツの現在の値。 SimpleTemplate ... ンスの内容がレンダリングされたかどうかを示す真偽値。 メソッド SimpleTemplateResponse. __init__ ( template , context = None , content_type = None , status = None , charset = None , using = None , headers = None ) [ソース] SimpleTemplateResponse オブジェクト ... template, or a list of template names. context テンプレートコンテキストに追加する値の dict 。デフォルトでは空の辞書です。 content_type HTTP の Content-Type ヘッダに含まれる値で、MIME タイプ指定と文字セットエンコーディングを含みます。もし content_type が ...
https://man.mtool.work/django/6.1/ref/template-response.html
メールを送信する 10889
メールを送信する 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 ... core.mail import EmailMultiAlternatives from django.template.loader import render_to_string # First, render the plain text content. text_content = render_to_string ( "templates/emails/my_email.txt" , context = { "my_variable" : 42 }, ) # Secondly, rende ... r the HTML content. html_content = render_to_string ( "templates/emails/my_email.html" , context = { "my_variable" : 42 }, ) # Then, create a ... multipart email instance. msg = EmailMultiAlternatives ( subject = "Subject here" , body = text_content , from_email = "from@example.com" , to = [ "to@example.com" ], headers = { "List-Unsubscribe" : "<mailto:unsub@example.com ...
https://man.mtool.work/django/6.1/topics/email.html
リクエストとレスポンスのオブジェクト 10193
リクエストとレスポンスのオブジェクト 簡単な概要 Django は、システムを通じてステータスを渡すために、リクエストとレスポンスのオブジェクトを使います。 あるページがリクエストされたとき、Django はリクエストに関するメタデータを含んだ HttpRequest ... ing 値を使用します。フォームデータが DEFAULT_CHARSET エンコーディングでないことがわかっている場合に便利です。 HttpRequest. content_type リクエストの MIME タイプを表す文字列です。 CONTENT_TYPE から識別されます。 HttpRequest. content_params CONTENT_TYPE ヘ ... ヘッダーが格納されたディクショナリです。利用可能なヘッダーはクライアントとサーバーによって異なりますが、以下に例を示します。 CONTENT_LENGTH -- リクエスト本文の (文字列としての) 長さです。 CONTENT_TYPE -- リクエスト本文の MIME タイプです。 HTTP_ACCEPT -- レ ... や "POST" といったです。 SERVER_NAME -- サーバのホスト名です。 SERVER_PORT -- (文字列としての) サーバのポートです。 上記の CONTENT_LENGTH と CONTENT_TYPE を除き、リクエストの HTTP ヘッダーは、すべての文字を大文字に変換し、ハイフンをアンダースコアに置き換 ...
https://man.mtool.work/django/6.1/ref/request-response.html
contenttypes フレームワーク 9906
contenttypes フレームワーク Django には contenttypes アプリケーションが含まれており、 Django を使ったプロジェクトにインストールされているすべてのモデルを追跡し、モデルを扱うための高レベルで汎用的なインターフェースを提供します。 概要 content ... types アプリケーションの中心にあるのは、 django.contrib.contenttypes.models.ContentType にある ContentType モデルです。 ContentType のインスタンスは、プロジェクトにインストールされたモデ ... ルに関する情報を表し、格納します。新しい ContentType のインスタンスは、新しいモデルがインストールされるたびに自動的に作成されます。 ContentType のインスタンスは ContentTyp ... e が表すモデルクラスを返すメソッドと、それらのモデルからオブジェクトを問い合わせるメソッドを持っています。また、 ContentType を操作するためのメソッドや、特定のモデルの ContentType のインスタンスを取得するためのメソッドを追加する カスタムマネー ...
https://man.mtool.work/django/6.1/ref/contrib/contenttypes.html
アップロードファイルとアップロードハンドラ 8985
アップロードファイルとアップロードハンドラ アップロードファイル class UploadedFile [ソース] ファイルアップロード中、実際のファイルデータは request.FILES に保存されます。この辞書の各エントリーは UploadedFile オブジェクト(またはそのサブクラス ... れたファイルの名前 (例: my_file.txt )。 UploadedFile. size アップロードされたファイルのサイズ(バイト単位)。 UploadedFile. content_type ファイルと共にアップロードされるコンテンツタイプのヘッダ (例: text/plain や application/pdf )。ユーザーから提供される ... がコンテンツタイプヘッダが示すコンテンツを含んでいることを検証する必要があります。"信頼するが検証せよ" です。 UploadedFile. content_type_extra content-type ヘッダーに渡される追加のパラメータを含む辞書です。通常、Google App Engine などのサービスがファイル ... サイズを使用します。 デフォルトは 64*2 10 bytes、つまり 64 KB です。 FileUploadHandler. new_file ( field_name , file_name , content_type , content_length , charset , content_type_extra ) [ソース] 新しいファイルのアップロード開始を通知するコールバックです ...
https://man.mtool.work/django/6.1/ref/files/uploads.html
クラスベースのジェネリックビュー: フラットインデックス 8649
クラスベースのジェネリックビュー: フラットインデックス この索引は、クラスベースビューのリファレンス文書を、異なる観点から編成したものです。ビューごとに、クラスツリーの有効な属性とメソッドが表されます。動作を定義するクラスの観点から編集された ... _view() dispatch() head() http_method_not_allowed() setup() TemplateView class TemplateView 属性 (とオプションのアクセサ): content_type extra_context http_method_names response_class [ render_to_response() ] template_engine template_name [ get_template_ ... _method_not_allowed() options() post() put() setup() 詳細ビュー DetailView class DetailView 属性 (とオプションのアクセサ): content_type context_object_name [ get_context_object_name() ] extra_context http_method_names model pk_url_kwarg query_pk_and_slu ... o_response() setup() リストビュー ListView class ListView 属性 (とオプションのアクセサ): allow_empty [ get_allow_empty() ] content_type context_object_name [ get_context_object_name() ] extra_context http_method_names model ordering [ get_ordering() ] p ...
https://man.mtool.work/django/6.1/ref/class-based-views/flattened-index.html
Porting your apps from Django 0.96 to 1.0 8413
Porting your apps from Django 0.96 to 1.0 Django 1.0 breaks compatibility with 0.96 in some areas. This guide will help you port 0.96 projects and apps to 1.0. The first part of this document includes the common changes needed to run with 1 ... uest ): f = request . FILES [ "file_field_name" ] ... ...you'd need to make the following changes: Old (0.96) New (1.0) f['content'] f.read() f['filename'] f.name f['content-type'] f.content_type Work with file fields using the new API The internal impl ... ill need to make the following changes, assuming your model's FileField is called myfile : Old (0.96) New (1.0) myfile.get_content_filename() myfile.content.path myfile.get_content_url() myfile.content.url myfile.get_content_size() myfile.content.size m ... yfile.save_content_file() myfile.content.save() myfile.get_content_width() myfile.content.width myfile.get_content_height() myfile.content.he ...
https://man.mtool.work/django/6.1/releases/1.0-porting-guide.html
Django 1.5 リリースノート 7952
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 ... te a streaming response by passing an iterator to HttpResponse . But this was unreliable: any middleware that accessed the content attribute would consume the iterator prematurely. You can now explicitly generate a streaming response with the new Stream ... ingHttpResponse class. This class exposes a streaming_content attribute which is an iterator. Since StreamingHttpResponse does not have a content attribute, middleware that needs acces ... s to the response content must test for streaming responses and behave accordingly. {% verbatim %} template tag To make it easier to deal with JavaS ...
https://man.mtool.work/django/6.1/releases/1.5.html
CSVを出力する 7666
CSVを出力する このドキュメントでは、Django のビューを使って動的に CSV (Comma Separated Values) を出力する方法を説明しています。そのためには、Python のCSV ライブラリか Django のテンプレートシステムを使います。 Python の CSV ライブラリを使う ... nse def some_view ( request ): # Create the HttpResponse object with the appropriate CSV header. response = HttpResponse ( content_type = "text/csv" , headers = { "Content-Disposition" : 'attachment; filename="somefilename.csv"' }, ) writer = csv . writ ... HTML と解釈し、ブラウザウィンドウに醜くて恐ろしいぐちゃぐちゃの文字列が現れてしまう恐れがあります。 レスポンスには、追加の Content-Disposition ヘッダに CSV のファイル名を設定することができます。ファイル名はどんなものでも構いません。ここで指定した名前は、 ... 0 ): yield "" . join ( writer . writerow ( row ) for row in batch ) return StreamingHttpResponse ( stream_batched_rows (), content_type = "text/csv" , headers = { "Content-Disposition" : 'attachment; filename="somefilename.csv"' }, ) テンプレートシステム ...
https://man.mtool.work/django/6.1/howto/outputting-csv.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT