1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Refs #18974 -- Added stacklevel for permalink() deprecation.

This commit is contained in:
Tim Graham 2017-03-28 17:58:10 -04:00
parent ea36e7454c
commit b59c0d722d

View File

@ -48,7 +48,8 @@ def permalink(func):
warnings.warn(
'permalink() is deprecated in favor of calling django.urls.reverse() '
'in the decorated method.',
RemovedInDjango21Warning
RemovedInDjango21Warning,
stacklevel=2,
)
@wraps(func)