def augment_request_with_app(cls, request, view_func): """ Stuff the app into the request for use in later-stage middleware """ if not hasattr(request, "_desktop_app"): module = inspect.getmodule(view_func) request._desktop_app = apputil.get_app_for_module(module) if not request._desktop_app and not module.__name__.startswith('django.'): logging.debug("no app for view func: %s in %s" % (view_func, module))
def augment_request_with_app(cls, request, view_func): """ Stuff the app into the request for use in later-stage middleware """ if not hasattr(request, "_desktop_app"): module = apputil.getmodule_wrapper(view_func) request._desktop_app = apputil.get_app_for_module(module) if not request._desktop_app and not module.__name__.startswith('django.'): logging.debug("no app for view func: %s in %s" % (view_func, module))