mirror of https://github.com/django/django.git
[1.11.x] Refs #18974 -- Added stacklevel for permalink() deprecation.
Backport of b59c0d722d
from master
This commit is contained in:
parent
eba34c49c2
commit
d476fa96ac
|
@ -48,7 +48,8 @@ def permalink(func):
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
'permalink() is deprecated in favor of calling django.urls.reverse() '
|
'permalink() is deprecated in favor of calling django.urls.reverse() '
|
||||||
'in the decorated method.',
|
'in the decorated method.',
|
||||||
RemovedInDjango21Warning
|
RemovedInDjango21Warning,
|
||||||
|
stacklevel=2,
|
||||||
)
|
)
|
||||||
|
|
||||||
@wraps(func)
|
@wraps(func)
|
||||||
|
|
Loading…
Reference in New Issue