'Stuff the app into the request for use in later-stage middleware'

@classmethod
def augment_request_with_app(cls, request, view_func):

    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)))
