summaryrefslogtreecommitdiff
path: root/django/views
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@polyconseil.fr>2012-05-03 15:27:01 +0200
committerAymeric Augustin <aymeric.augustin@polyconseil.fr>2012-05-03 15:27:01 +0200
commite84f79f05113f546810c1908c7baef99fb1e874a (patch)
tree4cb5f3e428caa894bd9acc06fc3cd6250b018715 /django/views
parent227cec686e512412f613c3d14743b85445765d92 (diff)
Fixed #18042 -- Advanced deprecation warnings.
Thanks Ramiro for the patch.
Diffstat (limited to 'django/views')
-rw-r--r--django/views/decorators/cache.py4
-rw-r--r--django/views/decorators/csrf.py4
2 files changed, 4 insertions, 4 deletions
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):