diff --git a/django/views/decorators/cache.py b/django/views/decorators/cache.py index a39cc54e331..ea7a3b5ebff 100644 --- a/django/views/decorators/cache.py +++ b/django/views/decorators/cache.py @@ -44,7 +44,8 @@ def cache_page(*args, **kwargs): warnings.warn('The cache_page decorator must be called like: ' 'cache_page(timeout, [cache=cache name], [key_prefix=key prefix]). ' 'All other ways are deprecated.', - PendingDeprecationWarning) + PendingDeprecationWarning, + stacklevel=3) if len(args) > 1: assert len(args) == 2, "cache_page accepts at most 2 arguments"