diff -r e651d5f24cb5 -r b01dd0ef43aa cubicweb/web/views/basecontrollers.py --- a/cubicweb/web/views/basecontrollers.py Wed Mar 13 13:37:49 2019 +0100 +++ b/cubicweb/web/views/basecontrollers.py Thu Mar 14 14:43:18 2019 +0100 @@ -19,60 +19,18 @@ object to handle publication. """ - -from cubicweb import _ - -from warnings import warn - from six import text_type from six.moves import http_client -from logilab.common.deprecation import deprecated - from cubicweb import (NoSelectableObject, ObjectNotFound, ValidationError, AuthenticationError, UndoTransactionException, Forbidden) from cubicweb.utils import json_dumps from cubicweb.predicates import (authenticated_user, anonymous_user, match_form_params) -from cubicweb.web import Redirect, RemoteCallFailed -from cubicweb.web.controller import Controller, append_url_params +from cubicweb.web import Redirect +from cubicweb.web.controller import Controller from cubicweb.web.views import vid_from_rset -import cubicweb.transaction as tx - -@deprecated('[3.15] jsonize is deprecated, use AjaxFunction appobjects instead') -def jsonize(func): - """decorator to sets correct content_type and calls `json_dumps` on - results - """ - def wrapper(self, *args, **kwargs): - self._cw.set_content_type('application/json') - return json_dumps(func(self, *args, **kwargs)) - wrapper.__name__ = func.__name__ - return wrapper - -@deprecated('[3.15] xhtmlize is deprecated, use AjaxFunction appobjects instead') -def xhtmlize(func): - """decorator to sets correct content_type and calls `xmlize` on results""" - def wrapper(self, *args, **kwargs): - self._cw.set_content_type(self._cw.html_content_type()) - result = func(self, *args, **kwargs) - return ''.join((u'