'Returns the url for the given handler.
The default implementation uses the patterns passed to the active
WSGIApplication to create a url. However, it is different from Django\'s
urlresolvers.reverse() in the following ways:
- It does not try to resolve handlers via module loading
- It does not support named arguments
- It performs some post-prosessing on the url to remove some regex
operators.
- It will try to fill in the left-most missing arguments with the args
used in the active request.
Args:
args: Parameters for the url pattern\'s groups.
kwargs: Optionally contains \'implicit_args\' that can either be a boolean
or a tuple. When it is True, it will use the arguments to the
active request as implicit arguments. When it is False (default),
it will not use any implicit arguments. When it is a tuple, it
will use the tuple as the implicit arguments.
the left-most args if some are missing from args.
Returns:
The url for this handler/args combination.
Raises:
NoUrlFoundError: No url pattern for this handler has the same
number of args that were passed in.'

@classmethod
def get_url(cls, *args, **kargs):

    app = WSGIApplication.active_instance
    pattern_map = app._pattern_map
    implicit_args = kargs.get('implicit_args', ())
    if (implicit_args == True):
        implicit_args = app.current_request_args
    min_params = len(args)
    for pattern_tuple in pattern_map.get(cls, ()):
        num_params_in_pattern = pattern_tuple[1]
        if (num_params_in_pattern < min_params):
            continue
        try:
            num_implicit_args = max(0, (num_params_in_pattern - len(args)))
            merged_args = (implicit_args[:num_implicit_args] + args)
            url = _reverse_url_pattern(pattern_tuple[0], *merged_args)
            url = url.replace('\\', '')
            url = url.replace('?', '')
            return url
        except CannotReversePattern:
            continue
    logging.warning('get_url    failed    for    Handler    name:    %r,    Args:    %r', cls.__name__, args)
    raise NoUrlFoundError
