... pp_configs , ** kwargs ): errors = [] # ... your check logic here if check_failed : errors . append ( Error ( "an error" , hint = "A hint." , obj = checked_object , id = "myapp.E001" , ) ) return errors チェック関数は、 必ず app_configs 引数を受け入れ ... n is not None and self . max is not None and self . min > self . max : return [ checks . Error ( "min greater than max." , hint = "Decrease min or increase max." , obj = self , id = "myapp.E001" , ) ] # When no error, return an empty list return [] モ ... できます。 from django.core.checks import Error errors = checked_object . check () expected_errors = [ Error ( "an error" , hint = "A hint." , obj = checked_object , id = "myapp.E001" , ) ] self . assertEqual ( errors , expected_errors ) インテグレーシ ... ... pp_configs , ** kwargs ): errors = [] # ... your check logic here if check_failed : errors . append ( Error ( "an error" , hint = "A hint." , obj = checked_object , id = "myapp.E001" , ) ) return errors チェック関数は、 必ず app_configs 引数を受け入れ ... n is not None and self . max is not None and self . min > self . max : return [ checks . Error ( "min greater than max." , hint = "Decrease min or increase max." , obj = self , id = "myapp.E001" , ) ] # When no error, return an empty list return [] モ ... できます。 from django.core.checks import Error errors = checked_object . check () expected_errors = [ Error ( "an error" , hint = "A hint." , obj = checked_object , id = "myapp.E001" , ) ] self . assertEqual ( errors , expected_errors ) インテグレーシ ... ... システムチェックのトピックガイド を参照してください。 API リファレンス ¶ CheckMessage ¶ class CheckMessage ( level , msg , hint = None , obj = None , id = None ) [ソース] ¶ システムチェックで発生する警告やエラーは CheckMessage のインスタンスでなければ ... ted to the console, but can be silenced. msg 問題を説明する短い (80 文字未満) 文字列。文字列には改行を含めてはいけません。 hint 問題を解決するためのヒントを示す1行の文字列。ヒントを提供できない場合、またはヒントがエラーメッセージから明らかな場合は、ヒ ... メッセージを簡単に作成するためのサブクラスがあります。これらを使用する場合、引数 level は省略できます。 class Debug ( msg , hint = None , obj = None , id = None ) [ソース] ¶ class Info ( msg , hint = None , obj = None , id = None ) [ソース] ¶ class Wa ... ... システムチェックのトピックガイド を参照してください。 API リファレンス ¶ CheckMessage ¶ class CheckMessage ( level , msg , hint = None , obj = None , id = None ) [ソース] ¶ システムチェックで発生する警告やエラーは CheckMessage のインスタンスでなければ ... ted to the console, but can be silenced. msg 問題を説明する短い (80 文字未満) 文字列。文字列には改行を含めてはいけません。 hint 問題を解決するためのヒントを示す1行の文字列。ヒントを提供できない場合、またはヒントがエラーメッセージから明らかな場合は、ヒ ... メッセージを簡単に作成するためのサブクラスがあります。これらを使用する場合、引数 level は省略できます。 class Debug ( msg , hint = None , obj = None , id = None ) [ソース] ¶ class Info ( msg , hint = None , obj = None , id = None ) [ソース] ¶ class Wa ... ... ます。 データベース ルーター ¶ データベース ルーターは、以下の 4 つのメソッドを提供するクラスです: db_for_read ( model , ** hints ) ¶ model 型のオブジェクトの読み取り操作に使用するデータベースをサジェストします。 データベース操作がデータベースを選択す ... る際に役立つ追加情報を提供できる場合、それは hints 辞書で与えられます。有効なヒントの詳細は 下記 を参照してください。 サジェストがない場合は None を返します。 db_for_write ... ( model , ** hints ) ¶ Model型のオブジェクトの書き込みに使用するデータベースをサジェストします。 データベース操作がデータベースを選択する際に ... ... ます。 データベース ルーター ¶ データベース ルーターは、以下の 4 つのメソッドを提供するクラスです: db_for_read ( model , ** hints ) ¶ model 型のオブジェクトの読み取り操作に使用するデータベースをサジェストします。 データベース操作がデータベースを選択す ... る際に役立つ追加情報を提供できる場合、それは hints 辞書で与えられます。有効なヒントの詳細は 下記 を参照してください。 サジェストがない場合は None を返します。 db_for_write ... ( model , ** hints ) ¶ Model型のオブジェクトの書き込みに使用するデータベースをサジェストします。 データベース操作がデータベースを選択する際に ... ... PAddressField has been deprecated. Support for it (except " "in historical migrations) will be removed in Django 1.9." ), "hint" : "Use GenericIPAddressField instead." , # optional "id" : "fields.W900" , # pick a unique ID for your field. } あなたが選 ... _check_removed_details = { "msg" : ( "IPAddressField has been removed except for support in " "historical migrations." ), "hint" : "Use GenericIPAddressField instead." , "id" : "fields.E900" , # pick a unique ID for your field. } __init__() 、 decons ... ... PAddressField has been deprecated. Support for it (except " "in historical migrations) will be removed in Django 1.9." ), "hint" : "Use GenericIPAddressField instead." , # optional "id" : "fields.W900" , # pick a unique ID for your field. } あなたが選 ... _check_removed_details = { "msg" : ( "IPAddressField has been removed except for support in " "historical migrations." ), "hint" : "Use GenericIPAddressField instead." , "id" : "fields.E900" , # pick a unique ID for your field. } __init__() 、 decons ... ... tures that have reached the end of their deprecation cycle and therefore been removed. If you haven't updated your code within the deprecation timeline for a given feature, its removal may appear as a backwards incompatible change. データベースバック ... se_queries class attribute to True on your test class. ResolverMatch.app_name was changed to contain the full namespace path in the case of nested namespaces. For consistency with ResolverMatch.namespace , the empty value is now an empty string inste ... ag will now use the namespace of the current request. Set request.current_app to None if you don't want to use a namespace hint. The SILENCED_SYSTEM_CHECKS setting now silences messages of all levels. Previously, messages of ERROR level or higher wer ... ... tures that have reached the end of their deprecation cycle and therefore been removed. If you haven't updated your code within the deprecation timeline for a given feature, its removal may appear as a backwards incompatible change. データベースバック ... se_queries class attribute to True on your test class. ResolverMatch.app_name was changed to contain the full namespace path in the case of nested namespaces. For consistency with ResolverMatch.namespace , the empty value is now an empty string inste ... ag will now use the namespace of the current request. Set request.current_app to None if you don't want to use a namespace hint. The SILENCED_SYSTEM_CHECKS setting now silences messages of all levels. Previously, messages of ERROR level or higher wer ... 2026年10月08日