... オブジェクトを生成します。それから Django は HttpRequest をビュー関数の最初の関数として渡し、適切なビューを読み込みます。あらゆるビューは HttpResponse オブジェクトを返す必要があり ... ます。 このドキュメントでは、 HttpRequest と HttpResponse オブジェクトの API を説明しています。これは django.http モジュールにて定義されています。 HttpRequest オブジ ... ェクト class HttpRequest [ソース] 属性 特に記載がない限り、全ての属性は読み取り専用だと考えてください。 HttpRequest. scheme [ソース] リクエストのス ... ... impleTemplateResponse のメソッド) (SyndicationFeed のメソッド) (TemplateResponse のメソッド) __iter__() (File のメソッド) (HttpRequest のメソッド) (ModelChoiceIterator のメソッド) (OGRGeometry のメソッド) __len__() (OGRGeometry のメソッド) __setitem__() (ba ... モジュール) abulk_update() (django.db.models.query.QuerySet モジュール) accept_idna (DomainNameValidator の属性) accepts() (HttpRequest のメソッド) AccessMixin (django.contrib.auth.mixins のクラス) acheck_password() (django.contrib.auth.hashers モジュール) ( ... reate() (django.db.models.query.QuerySet モジュール) aupdate_session_auth_hash() (django.contrib.auth モジュール) auser() (HttpRequest のメソッド) auth() (django.contrib.auth.context_processors モジュール) auth_code() (SpatialReference のメソッド) auth_name ... ... 操作を可能にするための仕様です。 ModelAdmin. save_model ( request , obj , form , change ) [ソース] save_model メソッドには、 HttpRequest 、モデルのインスタンス、 ModelForm のインスタンス、追加か変更かを表す真偽値が渡されます。このメソッドをオーバーライドすると ... () . save_model ( request , obj , form , change ) ModelAdmin. delete_model ( request , obj ) [ソース] delete_model には、 HttpRequest とモデルのインスタンスが渡されます。このメソッドをオーバーライドすると、削除の前後に操作を追加できます。 super().delete_mo ... 使ってオブジェクトを削除してください。 ModelAdmin. delete_queryset ( request , queryset ) [ソース] delete_queryset() には、 HttpRequest と削除するオブジェクトの QuerySet が渡されます。このメソッドをオーバーライドすると、"選択したオブジェクトの削除" アクション ... ... S, django.http.HttpRequest.scheme would incorrectly detect client requests made via HTTP as using HTTPS. This entails incorrect results for is_secure ... () , and build_absolute_uri() , and that HTTP requests would not be redirected to HTTPS in accordance with SECURE_SSL_REDIRECT . HttpRequest.scheme now respects SECURE_PROXY_S ... header is set on the request, for both HTTP and HTTPS requests. If you deploy Django behind a reverse-proxy that forwards HTTP requests, and that connects to Django via HTTPS, be sure to verify that your application correctly handles code paths relying on ... ... jango.http.HttpRequest.scheme would incorrectly detect client requests made via HTTP as using HTTPS. This entails incorrect results for is_secure ... () , and build_absolute_uri() , and that HTTP requests would not be redirected to HTTPS in accordance with SECURE_SSL_REDIRECT . HttpRequest.scheme now respects SECURE_PROXY_S ... header is set on the request, for both HTTP and HTTPS requests. If you deploy Django behind a reverse-proxy that forwards HTTP requests, and that connects to Django via HTTPS, be sure to verify that your application correctly handles code paths relying on ... ... ble, as was reported to us recently. The Host header parsing in Django 1.3.3 and Django 1.4.1 -- specifically, django.http.HttpRequest.get_host() -- was incorrectly handling username/password information in the header. Thus, for example, the following Host ... rticularly the password-reset mechanism -- to generate and display arbitrary URLs to users. To remedy this, the parsing in HttpRequest.get_host() is being modified; Host headers which contain potentially dangerous content (such as username/password pairs) n ... ... ting via HTTPS When deployed behind a reverse-proxy connecting to Django via HTTPS, django.http.HttpRequest.scheme would incorrectly detect client requests made via HTTP as using HTTPS. This entails incorrect results for is_secure ... () , and build_absolute_uri() , and that HTTP requests would not be redirected to HTTPS in accordance with SECURE_SSL_REDIRECT . HttpRequest.scheme now respects SECURE_PROXY_S ... header is set on the request, for both HTTP and HTTPS requests. If you deploy Django behind a reverse-proxy that forwards HTTP requests, and that connects to Django via HTTPS, be sure to verify that your application correctly handles code paths relying on ... ... ble, as was reported to us recently. The Host header parsing in Django 1.3.3 and Django 1.4.1 -- specifically, django.http.HttpRequest.get_host() -- was incorrectly handling username/password information in the header. Thus, for example, the following Host ... rticularly the password-reset mechanism -- to generate and display arbitrary URLs to users. To remedy this, the parsing in HttpRequest.get_host() is being modified; Host headers which contain potentially dangerous content (such as username/password pairs) n ... ... 録しておくと便利です。例えば、デフォルトでは Django は発生した例外の full traceback や、各 traceback frame のローカル変数、 HttpRequest の 属性 を記録します。 しかし、例えばユーザのパスワードやクレジットカード番号のように、ある種の情報は機密性が高すぎるため、 ... orator def process_info ( user ): ... sensitive_post_parameters ( * parameters ) [ソース] If one of your views receives an HttpRequest object with POST parameters susceptible to contain sensitive information, you may prevent the values of those parameters f ... ve_variables() と sensitive_post_parameters() がすることは、それぞれ、装飾された関数にセンシティブな変数名をアノテートし、 HttpRequest オブジェクトにセンシティブな POST パラメータ名をアノテートするだけです。実際のフィルタリングは Django のデフォルトのエラー ... ... れます。 このシグナルとともに送信される引数は以下の通りです: sender たった今ログインしたユーザのクラスです。 request 現在の HttpRequest インスタンスです。 user たった今ログインしたユーザのインスタンスです。 user_logged_out logout メソッドが呼ばれたときに送信 ... 上記の通り: たった今ログアウトしたユーザのクラス、もしくはユーザが認証されなかった場合は None となります。 request 現在の HttpRequest インスタンスです。 user たった今ログアウトしたユーザのインスタンスか、ユーザが認証されなかった場合は None です。 user_logi ... (パスワードを含んだ) 資格情報は、シグナルの一部として明確には送信されません。 request authenticate() に提供されている場合、 HttpRequest オブジェクト。 認証のバックエンド このセクションでは、Django に付属する認証バックエンドについて詳しく説明します。 使用方法 ... 2026年10月08日