Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit 55aa285a339e3815bfec1077962e2bf4596a43bc 1 parent 4dbeb4b
Jannis Leidel jezdez authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  django/views/decorators/cache.py
3  django/views/decorators/cache.py
View
@@ -44,7 +44,8 @@ def warn():
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"
Please sign in to comment.
Something went wrong with that request. Please try again.