(view_fn, view_kwargs)
return view_fn
Given a view_fn from the `process_view` middleware function return the actual
    function or class that represents the view.

    :returns: the view function or class or None if not able to determine the view class
Given a view_fn from the `process_view` middleware function return the actual
    function or class that represents the view.
Given a view_fn from the process_view middleware function return the actual function or class that represents the view .
def get_view_func(view_fn, view_kwargs):
    """Given a view_fn from the `process_view` middleware function return the actual
    function or class that represents the view.

    :returns: the view function or class or None if not able to determine the view class
    """
    if getattr(view_fn, 'is_hq_report', False):  # HQ report
        dispatcher = view_fn.view_class
        domain = view_kwargs.get("domain", None)
        slug = view_kwargs.get("report_slug", None)
        try:
            class_name = dispatcher.get_report_class_name(domain, slug)
            return to_function(class_name) if class_name else None
        except:
            # custom report dispatchers may do things differently
            return

    if hasattr(view_fn, "view_class"):  # Django view
        return view_fn.view_class

    return view_fn
def get_view_func ( view_fn , view_kwargs ) : if getattr ( view_fn , 'is_hq_report' , False ) : # HQ report dispatcher = view_fn . view_class domain = view_kwargs . get ( "domain" , None ) slug = view_kwargs . get ( "report_slug" , None ) try : class_name = dispatcher . get_report_class_name ( domain , slug ) return to_function ( class_name ) if class_name else None except : # custom report dispatchers may do things differently return if hasattr ( view_fn , "view_class" ) : # Django view return view_fn . view_class return view_fn