-
響應的
ResolverMatch
func
# my_view here is a function based view self.assertEqual(response.resolver_match.func, my_view) # class-based views need to be compared by name, as the functions # generated by as_view() won't be equal self.assertEqual(response.resolver_match.func.__name__, MyView.as_view().__name__)
如果未找到給定的 URL,訪問此屬性將引發
Resolver404
本文介紹 django.test.Response.resolver_match
的用法。
聲明
resolver_match
相關用法
- Python Django Response.json用法及代碼示例
- Python Django Response.context用法及代碼示例
- Python Django Repeat用法及代碼示例
- Python Django RelatedManager.set用法及代碼示例
- Python Django RelatedManager.remove用法及代碼示例
- Python Django RequestContext用法及代碼示例
- Python Django Reverse用法及代碼示例
- Python Django Redirect用法及代碼示例
- Python Django RelatedManager.clear用法及代碼示例
- Python Django RelatedManager.create用法及代碼示例
- Python Django RelatedManager.add用法及代碼示例
- Python Django RedirectView用法及代碼示例
- Python Django RequireDebugFalse用法及代碼示例
- Python Django Replace用法及代碼示例
- Python Django RandomUUID用法及代碼示例
- Python RLock acquire()用法及代碼示例
- Python Random.Choices()用法及代碼示例
- Python Django REQUIRED_FIELDS用法及代碼示例
- Python Django Radians用法及代碼示例
- Python Django RawSQL用法及代碼示例
- Python Django RadioSelect用法及代碼示例
- Python Django Right用法及代碼示例
- Python Django RangeOperators用法及代碼示例
- Python RLock release()用法及代碼示例
- Python PIL RankFilter()用法及代碼示例
注:本文由純淨天空篩選整理自djangoproject.com大神的英文原創作品 django.test.Response.resolver_match。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。