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
This commit is contained in:
parent
4dbeb4bca4
commit
55aa285a33
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue