summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2012-02-09 18:59:12 +0000
committerJannis Leidel <jannis@leidel.info>2012-02-09 18:59:12 +0000
commit55aa285a339e3815bfec1077962e2bf4596a43bc (patch)
tree09a26ea83bb03ea2cfd44297068b34f9f05c5a1e
parent4dbeb4bca4638ff851a2f4844d262dbe1652f7b5 (diff)
Fixed #17643 -- Set a better stack level for the cache_page decorator deprecation warnings. Thanks, zsiciarz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17484 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/views/decorators/cache.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/views/decorators/cache.py b/django/views/decorators/cache.py
index a39cc54e33..ea7a3b5ebf 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"