# Path: djangorpc/exceptions.py
# class RpcExceptionEvent(BaseRpcException):
#     """
#     This exception is sent to server as Ext.Direct.ExceptionEvent.
#     So we can handle it in client and show pretty message for user.
#     Example::
# 
#         class MainApiClass(object):
# 
#             def func2(self, user):
#                 if not user.is_authenticated():
#                     raise RpcExceptionEvent(u'Permission denied.')
# 
#     And you can catch this with::
# 
#         jQuery.Rpc.on('exception', function(event){
#             alert('ERROR: '+event.message);
#         });
#     """
#     pass


from django.utils.translation import ugettext_lazy as _
from djangorpc.exceptions import RpcExceptionEvent
from __future__ import unicode_literals



METHOD_ATTRIBUTES = ['_pre_execute', '_form_handler', '_extra_kwargs']


def copy_method_attributes(from_method, to_method):
    for attr in METHOD_ATTRIBUTES:

# Path: djangorpc/exceptions.py
# class RpcExceptionEvent(BaseRpcException):
#     """
#     This exception is sent to server as Ext.Direct.ExceptionEvent.
#     So we can handle it in client and show pretty message for user.
#     Example::
# 
#         class MainApiClass(object):
# 
#             def func2(self, user):
#                 if not user.is_authenticated():
#                     raise RpcExceptionEvent(u'Permission denied.')
# 
#     And you can catch this with::
# 
#         jQuery.Rpc.on('exception', function(event){
#             alert('ERROR: '+event.message);
#         });
#     """
#     pass


# Path: djangorpc/decorators.py
from django.utils.translation import ugettext_lazy as _
from djangorpc.exceptions import RpcExceptionEvent

from __future__ import unicode_literals



METHOD_ATTRIBUTES = ['_pre_execute', '_form_handler', '_extra_kwargs']


def copy_method_attributes(from_method, to_method):
    for attr in METHOD_ATTRIBUTES:

        if hasattr(from_method, attr):