mirror of
https://github.com/django/django.git
synced 2025-12-15 21:45:20 +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
|
|
@ -1,5 +1,5 @@
|
|||
from django.conf.urls import url
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^guitarists/(\w{1,50})/$', 'unimplemented_view_placeholder', name='guitarist_detail'),
|
||||
url(r'^guitarists/(\w{1,50})/$', 'model_permalink.views.empty_view', name='guitarist_detail'),
|
||||
]
|
||||
|
|
|
|||
5
tests/model_permalink/views.py
Executable file
5
tests/model_permalink/views.py
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
from django.http import HttpResponse
|
||||
|
||||
|
||||
def empty_view(request, *args, **kwargs):
|
||||
return HttpResponse('')
|
||||
Loading…
Add table
Add a link
Reference in a new issue