def _view_wrapper(self, action_func, *args, **kwargs):
        self._action_name = self._get_action_name(action_func)
        self._action_func = action_func

        if hasattr(action_func, 'ignore_ajax'):
            warnings.warn("action.ignore_ajax is deprecated, remove 2017-01-01", DeprecationWarning)
            self._no_ajax_prefix = self._no_ajax_prefix or getattr(action_func, 'ignore_ajax', False)
        else:
            self._no_ajax_prefix = self._no_ajax_prefix or getattr(action_func, 'no_ajax_prefix', False)

        self._action_name_sans_prefix = self._get_action_name(action_func, with_prefix=False)
        
        if hasattr(action_func,'allowed_methods'):
            if type(action_func.allowed_methods) not in (list, tuple):
                allowed_methods = [action_func.allowed_methods.upper()]
            else:
                allowed_methods = [i.upper() for i in action_func.allowed_methods]
            if self._request.method.upper() not in allowed_methods:
                return HttpResponseNotAllowed(allowed_methods)
                
        send_args = {}
        if hasattr(action_func,'mimetype'):
            send_args['mimetype'] = action_func.mimetype

        try:
            response = self.__wrap_before_filter(action_func, *args, **kwargs)

            if type(response) is dict:
                return self.__wrap_after_filter(self.__wrapped_render, response, **send_args)
            elif type(response) in (str,unicode,SafeUnicode):
                return self.__wrap_after_filter(self.__wrapped_print, response, **send_args)
            else:
                return response

        except Exception, exception:
            response = self._on_exception(request=self._request, exception=exception)
            
            if response is None:
                raise exception, None, sys.exc_info()[-1]
            else:
                if type(response) is dict:
                    return self.__wrapped_render(dictionary=response, template_name=self._get_error_template_path())
                elif (str,unicode,SafeUnicode) in type(response):
                    return self.__wrapped_print(text=response, **send_args)
                else:
                    return response
dataset/ETHPy150Open zeraien/django-url-framework/django_url_framework/controller.py/ActionController._view_wrapper/swapped operands of `in`