(self, record)
return reverse(**params)
Prepares the arguments to reverse() for this record and calls reverse()
Prepares the arguments to reverse() for this record and calls reverse()
Prepares the arguments to reverse () for this record and calls reverse ()
def call_reverse(self, record):
        """
        Prepares the arguments to reverse() for this record and calls reverse()
        """

        def resolve_if_accessor(val):
            return val.resolve(record) if isinstance(val, Accessor) else val

        params = self.reverse_args.copy()

        params["viewname"] = resolve_if_accessor(params["viewname"])
        if params.get("urlconf", None):
            params["urlconf"] = resolve_if_accessor(params["urlconf"])
        if params.get("args", None):
            params["args"] = [resolve_if_accessor(a) for a in params["args"]]
        if params.get("kwargs", None):
            params["kwargs"] = {
                key: resolve_if_accessor(val) for key, val in params["kwargs"].items()
            }
        if params.get("current_app", None):
            params["current_app"] = resolve_if_accessor(params["current_app"])

        return reverse(**params)
def call_reverse ( self , record ) : def resolve_if_accessor ( val ) : return val . resolve ( record ) if isinstance ( val , Accessor ) else val params = self . reverse_args . copy ( ) params [ "viewname" ] = resolve_if_accessor ( params [ "viewname" ] ) if params . get ( "urlconf" , None ) : params [ "urlconf" ] = resolve_if_accessor ( params [ "urlconf" ] ) if params . get ( "args" , None ) : params [ "args" ] = [ resolve_if_accessor ( a ) for a in params [ "args" ] ] if params . get ( "kwargs" , None ) : params [ "kwargs" ] = { key : resolve_if_accessor ( val ) for key , val in params [ "kwargs" ] . items ( ) } if params . get ( "current_app" , None ) : params [ "current_app" ] = resolve_if_accessor ( params [ "current_app" ] ) return reverse ( * * params )