... 場合は、同期スレッドを作成し、その中で呼び出してください。これは、 asgiref.sync.sync_to_async() を使用して実現できます。 URL Resolver の例外 ¶ URL Resolver の例外は django.urls で定義されています。 Resolver404 ¶ exception Resolver404 [ソース] ¶ The Resolve ... gured FieldError FieldFetchBlocked ValidationError NON_FIELD_ERRORS BadRequest RequestAborted SynchronousOnlyOperation URL Resolver の例外 Resolver404 NoReverseMatch データベースの例外 HTTP 例外 UnreadablePostError セッションの例外 SessionInterrupted トラ ... モデル models Python クエリ リクエスト データベース クラス MultipleObjectsReturned SuspiciousOperation BadRequest スレッド Resolver 関連するページ Model クラスのリファレンス モデル 組み込みのビュー ミドルウェア (Middleware) Django ドキュメント目次 カスタ ... ... 場合は、同期スレッドを作成し、その中で呼び出してください。これは、 asgiref.sync.sync_to_async() を使用して実現できます。 URL Resolver の例外 ¶ URL Resolver の例外は django.urls で定義されています。 Resolver404 ¶ exception Resolver404 [ソース] ¶ The Resolve ... gured FieldError FieldFetchBlocked ValidationError NON_FIELD_ERRORS BadRequest RequestAborted SynchronousOnlyOperation URL Resolver の例外 Resolver404 NoReverseMatch データベースの例外 HTTP 例外 UnreadablePostError セッションの例外 SessionInterrupted トラ ... eption ソース モデル models クエリ リクエスト データベース MultipleObjectsReturned SuspiciousOperation BadRequest スレッド Resolver exceptions セッション サブクラス ValidationError クライアント コード ObjectDoesNotExist Model 基底 except ObjectNotUpdated ... ... リケーションのインスタンスのリストを生成します。 If there is a current application defined, Django finds and returns the URL resolver for that instance. The current application can be specified with the current_app argument to the reverse() function. url テ ... or-polls/" という結果になります。 クラスベースビューのメソッド内: reverse ( "polls:index" , current_app = self . request . resolver_match . namespace ) テンプレート内: {% url 'polls:index' %} 現在のインスタンスがない場合(例えば、サイトの他の場所でページ ... ... 知使っている場合、 template_name が、レンダリングに使われるテンプレートの名前のみが必要な場合の適切な代替策となるでしょう。 resolver_match ¶ レスポンスに対する ResolverMatch のインスタンスです。たとえば、次のようにレスポンスを提供するビューを検証するために ... func 属性を使えます。 # my_view here is a function based view. self . assertEqual ( response . resolver_match . func , my_view ) # Class-based views need to compare the view_class, as the # functions generated by as_view() won ... 't be equal. self . assertIs ( response . resolver_match . func . view_class , MyView ) 指定された URL が見つからない場合、この属性にアクセスすると Resolver404 例外が投げられ ... ... リケーションのインスタンスのリストを生成します。 If there is a current application defined, Django finds and returns the URL resolver for that instance. The current application can be specified with the current_app argument to the reverse() function. url テ ... or-polls/" という結果になります。 クラスベースビューのメソッド内: reverse ( "polls:index" , current_app = self . request . resolver_match . namespace ) テンプレート内: {% url 'polls:index' %} 現在のインスタンスがない場合(例えば、サイトの他の場所でページ ... ... 知使っている場合、 template_name が、レンダリングに使われるテンプレートの名前のみが必要な場合の適切な代替策となるでしょう。 resolver_match ¶ レスポンスに対する ResolverMatch のインスタンスです。たとえば、次のようにレスポンスを提供するビューを検証するために ... func 属性を使えます。 # my_view here is a function based view. self . assertEqual ( response . resolver_match . func , my_view ) # Class-based views need to compare the view_class, as the # functions generated by as_view() won ... 't be equal. self . assertIs ( response . resolver_match . func . view_class , MyView ) 指定された URL が見つからない場合、この属性にアクセスすると Resolver404 例外が投げられ ... ... fast-path allows for less queries and less objects fetched into memory. See QuerySet.delete() for details. An instance of ResolverMatch is stored on the request as resolver_match . By default, all logging messages reaching the django logger when DEBUG i ... ... fast-path allows for less queries and less objects fetched into memory. See QuerySet.delete() for details. An instance of ResolverMatch is stored on the request as resolver_match . By default, all logging messages reaching the django logger when DEBUG i ... ... デフォルトのオプション 追加の便利機能 コードから管理コマンドを実行する 出力のリダイレクト Django の例外 Django Core 例外 URL Resolver の例外 データベースの例外 HTTP 例外 セッションの例外 トランザクションの例外 テストフレームワークの例外 Python の例外 ファイ ... ... run the test cases in reverse order ( --reverse ), and to enable SQL logging for failing tests ( --debug-sql ). Added the resolver_match attribute to test client responses. Added several settings that allow customization of test tablespace parameters fo ... 2026年10月08日