mirror of
https://github.com/django/django.git
synced 2025-11-01 20:31:40 +00:00
Fixed #21157 -- Fixed problems with ResolverMatch
- Fixed bug in get_callable() that caused resolve() to put a string in ResolverMatch.func. - Made ResolverMatch.url_name match the actual url name (or None). - Updated tests that used the string value in ResolverMatch.func, and added regression tests for this bug. - Corrected test urls whose dummy view paths caused failures (behavior that was previously masked by this bug).
This commit is contained in:
parent
0aa4c6c391
commit
91afc00513
10 changed files with 121 additions and 93 deletions
|
|
@ -10,9 +10,9 @@ class URLObject(object):
|
|||
|
||||
def urls(self):
|
||||
return ([
|
||||
url(r'^inner/$', 'empty_view', name='urlobject-view'),
|
||||
url(r'^inner/(?P<arg1>[0-9]+)/(?P<arg2>[0-9]+)/$', 'empty_view', name='urlobject-view'),
|
||||
url(r'^inner/\+\\\$\*/$', 'empty_view', name='urlobject-special-view'),
|
||||
url(r'^inner/$', 'urlpatterns_reverse.views.empty_view', name='urlobject-view'),
|
||||
url(r'^inner/(?P<arg1>[0-9]+)/(?P<arg2>[0-9]+)/$', 'urlpatterns_reverse.views.empty_view', name='urlobject-view'),
|
||||
url(r'^inner/\+\\\$\*/$', 'urlpatterns_reverse.views.empty_view', name='urlobject-special-view'),
|
||||
], self.app_name, self.namespace)
|
||||
urls = property(urls)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue