... jango's built-in authentication backend classes. django.contrib.auth.forms django.contrib.auth.hashers django.contrib.auth.middleware Authentication middleware. django.contrib.auth.password_validation django.contrib.auth.signals django.contrib.auth.views d ... ch" to data. django.contrib.messages Provides cookie- and session-based temporary message storage. django.contrib.messages.middleware Message middleware. django.contrib.messages.test django.contrib.postgres PostgreSQL-specific fields and features django.co ... k for managing redirects. django.contrib.sessions Provides session management for Django projects. django.contrib.sessions.middleware Session middleware. django.contrib.sitemaps A framework for generating Google sitemap XML files. django.contrib.sites Lets ... ... jango's built-in authentication backend classes. django.contrib.auth.forms django.contrib.auth.hashers django.contrib.auth.middleware Authentication middleware. django.contrib.auth.password_validation django.contrib.auth.signals django.contrib.auth.views d ... ch" to data. django.contrib.messages Provides cookie- and session-based temporary message storage. django.contrib.messages.middleware Message middleware. django.contrib.messages.test django.contrib.postgres PostgreSQL-specific fields and features django.co ... k for managing redirects. django.contrib.sessions Provides session management for Django projects. django.contrib.sessions.middleware Session middleware. django.contrib.sitemaps A framework for generating Google sitemap XML files. django.contrib.sites Lets ... ... 各ミドルウェアのコンポーネントは、それぞれある特定の機能を実行する役目を持っています。たとえば、Django には AuthenticationMiddleware というミドルウェアコンポーネントがあります。このミドルウェアは、セッションを利用して、リクエストとユーザーとを関連付けます ... 取ってレスポンスを返す呼び出し可能なオブジェクトです。 ミドルウェアは、以下のように関数として書くことができます: def simple_middleware ( get_response ): # One-time configuration and initialization. def middleware ( request ): # Code to be executed for each ... request before # the view (and later middleware) are called. response = get_response ( request ) # Code to be executed for each request/response after # the view is calle ... ... 各ミドルウェアのコンポーネントは、それぞれある特定の機能を実行する役目を持っています。たとえば、Django には AuthenticationMiddleware というミドルウェアコンポーネントがあります。このミドルウェアは、セッションを利用して、リクエストとユーザーとを関連付けます ... 取ってレスポンスを返す呼び出し可能なオブジェクトです。 ミドルウェアは、以下のように関数として書くことができます: def simple_middleware ( get_response ): # One-time configuration and initialization. def middleware ( request ): # Code to be executed for each ... request before # the view (and later middleware) are called. response = get_response ( request ) # Code to be executed for each request/response after # the view is calle ... ... 方法についての情報は、 ミドルウェア使用ガイド を参照してください。 使用できる middleware ¶ Cache middleware ¶ class UpdateCacheMiddleware [ソース] ¶ class FetchFromCacheMiddleware [ソース] ¶ サイト全体でキャッシ ... ュを有効にします。有効にすると、Django を利用している各ページは CACHE_MIDDLEWARE_SECONDS 設定で指定した時間だけキャッシュされます。詳しくは キャッシュのドキュメント を参照してください。 Common middleware ... ¶ class CommonMiddleware [ソース] ¶ response_redirect_class ¶ デフォルトは HttpResponsePermanentRedirect です。ミドルウェアが発行するリダイレクトを ... ... 方法についての情報は、 ミドルウェア使用ガイド を参照してください。 使用できる middleware ¶ Cache middleware ¶ class UpdateCacheMiddleware [ソース] ¶ class FetchFromCacheMiddleware [ソース] ¶ サイト全体でキャッシ ... ュを有効にします。有効にすると、Django を利用している各ページは CACHE_MIDDLEWARE_SECONDS 設定で指定した時間だけキャッシュされます。詳しくは キャッシュのドキュメント を参照してください。 Common middleware ... ¶ class CommonMiddleware [ソース] ¶ response_redirect_class ¶ デフォルトは HttpResponsePermanentRedirect です。ミドルウェアが発行するリダイレクトを ... ... upplied via an HTTP header, as in ASGI). Django can be configured to make use of the REMOTE_USER value using the RemoteUserMiddleware or PersistentRemoteUserMiddleware , and RemoteUserBackend classes found in django.contrib.auth . 設定 ¶ 最初に次のように M ... IDDLEWARE 設定に django.contrib.auth.middleware.RemoteUserMiddleware を加える必要があります。これは django.contrib.auth.middleware.AuthenticationMiddleware の 後に 追加し ... てください: MIDDLEWARE = [ "..." , "django.contrib.auth.middleware.AuthenticationMiddleware" , "django.contrib.auth.middleware.RemoteUserMiddlewa ... ... upplied via an HTTP header, as in ASGI). Django can be configured to make use of the REMOTE_USER value using the RemoteUserMiddleware or PersistentRemoteUserMiddleware , and RemoteUserBackend classes found in django.contrib.auth . 設定 ¶ 最初に次のように M ... IDDLEWARE 設定に django.contrib.auth.middleware.RemoteUserMiddleware を加える必要があります。これは django.contrib.auth.middleware.AuthenticationMiddleware の 後に 追加し ... てください: MIDDLEWARE = [ "..." , "django.contrib.auth.middleware.AuthenticationMiddleware" , "django.contrib.auth.middleware.RemoteUserMiddlewa ... ... s.db.models.functions のクラス) async_client (SimpleTestCase の属性) async_client_class (SimpleTestCase の属性) async_only_middleware() (django.utils.decorators モジュール) async_to_sync() (asgiref.sync モジュール) AsyncClient (django.test のクラス) AsyncP ... KENDS setting authentication_form (LoginView の属性) AuthenticationForm (django.contrib.auth.forms のクラス) AuthenticationMiddleware (django.contrib.auth.middleware のクラス) auto_created (Field の属性) auto_id (BoundField の属性) (Form の属性) auto_now ( ... cle (django.contrib.gis.db.models.functions のクラス) BrinIndex (django.contrib.postgres.indexes のクラス) BrokenLinkEmailsMiddleware (django.middleware.common のクラス) BtreeGinExtension (django.contrib.postgres.operations のクラス) BtreeGistExtension (dj ... ... s.db.models.functions のクラス) async_client (SimpleTestCase の属性) async_client_class (SimpleTestCase の属性) async_only_middleware() (django.utils.decorators モジュール) async_to_sync() (asgiref.sync モジュール) AsyncClient (django.test のクラス) AsyncP ... KENDS setting authentication_form (LoginView の属性) AuthenticationForm (django.contrib.auth.forms のクラス) AuthenticationMiddleware (django.contrib.auth.middleware のクラス) auto_created (Field の属性) auto_id (BoundField の属性) (Form の属性) auto_now ( ... cle (django.contrib.gis.db.models.functions のクラス) BrinIndex (django.contrib.postgres.indexes のクラス) BrokenLinkEmailsMiddleware (django.middleware.common のクラス) BtreeGinExtension (django.contrib.postgres.operations のクラス) BtreeGistExtension (dj ... 2026年10月08日