aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework
diff options
context:
space:
mode:
authorTom Christie2014-08-29 12:53:45 +0100
committerTom Christie2014-08-29 12:53:45 +0100
commitf87d32558eb3b36f14a798ec48e4943d25380b92 (patch)
treeaaaca1906f071afbc4e40451ed40be0ae8483d4c /rest_framework
parentce7b2cded94abc12ae1be076642de96684d0927b (diff)
downloaddjango-rest-framework-f87d32558eb3b36f14a798ec48e4943d25380b92.tar.bz2
Remove `.link()` and `.action()` decorators.
Diffstat (limited to 'rest_framework')
-rw-r--r--rest_framework/decorators.py34
1 files changed, 0 insertions, 34 deletions
diff --git a/rest_framework/decorators.py b/rest_framework/decorators.py
index 449ba0a2..cc5d92c2 100644
--- a/rest_framework/decorators.py
+++ b/rest_framework/decorators.py
@@ -130,37 +130,3 @@ def list_route(methods=['get'], **kwargs):
func.kwargs = kwargs
return func
return decorator
-
-
-# These are now pending deprecation, in favor of `detail_route` and `list_route`.
-
-def link(**kwargs):
- """
- Used to mark a method on a ViewSet that should be routed for detail GET requests.
- """
- msg = 'link is pending deprecation. Use detail_route instead.'
- warnings.warn(msg, PendingDeprecationWarning, stacklevel=2)
-
- def decorator(func):
- func.bind_to_methods = ['get']
- func.detail = True
- func.kwargs = kwargs
- return func
-
- return decorator
-
-
-def action(methods=['post'], **kwargs):
- """
- Used to mark a method on a ViewSet that should be routed for detail POST requests.
- """
- msg = 'action is pending deprecation. Use detail_route instead.'
- warnings.warn(msg, PendingDeprecationWarning, stacklevel=2)
-
- def decorator(func):
- func.bind_to_methods = methods
- func.detail = True
- func.kwargs = kwargs
- return func
-
- return decorator