From e84f79f05113f546810c1908c7baef99fb1e874a Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Thu, 3 May 2012 15:27:01 +0200 Subject: Fixed #18042 -- Advanced deprecation warnings. Thanks Ramiro for the patch. --- django/views/decorators/cache.py | 4 ++-- django/views/decorators/csrf.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'django/views') diff --git a/django/views/decorators/cache.py b/django/views/decorators/cache.py index ea7a3b5ebf..ac8b3752d7 100644 --- a/django/views/decorators/cache.py +++ b/django/views/decorators/cache.py @@ -44,8 +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, - stacklevel=3) + DeprecationWarning, + stacklevel=2) if len(args) > 1: assert len(args) == 2, "cache_page accepts at most 2 arguments" diff --git a/django/views/decorators/csrf.py b/django/views/decorators/csrf.py index 9b92d26e95..60664ff932 100644 --- a/django/views/decorators/csrf.py +++ b/django/views/decorators/csrf.py @@ -55,7 +55,7 @@ def csrf_response_exempt(view_func): """ warnings.warn("csrf_response_exempt is deprecated. It no longer performs a " "function, and calls to it can be removed.", - PendingDeprecationWarning) + DeprecationWarning) return view_func def csrf_view_exempt(view_func): @@ -63,7 +63,7 @@ def csrf_view_exempt(view_func): Marks a view function as being exempt from CSRF view protection. """ warnings.warn("csrf_view_exempt is deprecated. Use csrf_exempt instead.", - PendingDeprecationWarning) + DeprecationWarning) return csrf_exempt(view_func) def csrf_exempt(view_func): -- cgit v1.3