Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 authored February 09, 2012

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. 3  django/views/decorators/cache.py
3  django/views/decorators/cache.py
@@ -44,7 +44,8 @@ def warn():
44 44
         warnings.warn('The cache_page decorator must be called like: '
45 45
                       'cache_page(timeout, [cache=cache name], [key_prefix=key prefix]). '
46 46
                       'All other ways are deprecated.',
47  
-                      PendingDeprecationWarning)
  47
+                      PendingDeprecationWarning,
  48
+                      stacklevel=3)
48 49
 
49 50
     if len(args) > 1:
50 51
         assert len(args) == 2, "cache_page accepts at most 2 arguments"

0 notes on commit 55aa285

Please sign in to comment.
Something went wrong with that request. Please try again.