[3.1.x] Refs #31534 -- Improved django.conf.urls.url() warning message with stacklevel=2.
Use stacklevel=2 to show the calling site.
Backport of 437196da9a
from master
This commit is contained in:
parent
b205c0b0cc
commit
6e3c543909
|
@ -17,5 +17,6 @@ def url(regex, view, kwargs=None, name=None):
|
||||||
'django.conf.urls.url() is deprecated in favor of '
|
'django.conf.urls.url() is deprecated in favor of '
|
||||||
'django.urls.re_path().',
|
'django.urls.re_path().',
|
||||||
RemovedInDjango40Warning,
|
RemovedInDjango40Warning,
|
||||||
|
stacklevel=2,
|
||||||
)
|
)
|
||||||
return re_path(regex, view, kwargs, name)
|
return re_path(regex, view, kwargs, name)
|
||||||
|
|
Loading…
Reference in New Issue