From e43ea107ed798824b1c8c1386dac3a0d9dfd5a9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Wed, 10 Feb 2016 19:45:34 +0100 Subject: [PATCH] Remove rest framework deprecated decorators --- taiga/base/decorators.py | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/taiga/base/decorators.py b/taiga/base/decorators.py index af496de4..9f7ebe13 100644 --- a/taiga/base/decorators.py +++ b/taiga/base/decorators.py @@ -15,8 +15,6 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -import warnings - # Rest Framework 2.4 backport some decorators. @@ -44,37 +42,3 @@ def list_route(methods=['get'], **kwargs): func.kwargs = kwargs return func return decorator - - -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.permission_classes = kwargs.get('permission_classes', []) - 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.permission_classes = kwargs.get('permission_classes', []) - func.kwargs = kwargs - return func - - return decorator