>>> HelperURI.urljoin(False, *('http://127.0.0.1:8000', 'dumb_upload'))
        'http://127.0.0.1:8000/dumb_upload'

        >>> HelperURI.urljoin(True, *('http://127.0.0.1:8000', 'dumb_upload'))
        'http://127.0.0.1:8000/dumb_upload/'

def urljoin(end_with_slash, *args):
        """
        >>> HelperURI.urljoin(False, *('http://127.0.0.1:8000', 'dumb_upload'))
        'http://127.0.0.1:8000/dumb_upload'

        >>> HelperURI.urljoin(True, *('http://127.0.0.1:8000', 'dumb_upload'))
        'http://127.0.0.1:8000/dumb_upload/'
        """
        last = args[0]
        for i in args[1:]:
            last = '%s/%s' % (last.strip('/'), i.strip('/'))

        if end_with_slash:
            if last[-1] != '/':
                last += '/'
        return last