1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Refs #31534 -- Improved django.conf.urls.url() warning message with stacklevel=2.

Use stacklevel=2 to show the calling site.
This commit is contained in:
Jon Dufresne
2020-05-23 09:17:31 -07:00
committed by GitHub
parent dfb9ae1d23
commit 437196da9a

View File

@@ -17,5 +17,6 @@ def url(regex, view, kwargs=None, name=None):
'django.conf.urls.url() is deprecated in favor of '
'django.urls.re_path().',
RemovedInDjango40Warning,
stacklevel=2,
)
return re_path(regex, view, kwargs, name)