'Replace ``settings.COMPRESS_URL`` URL prefix with  \'../\' * (N + 1)
where N is the *depth* of ``settings.COMPRESS_OUTPUT_DIR`` folder.
E.g. by default ``settings.COMPRESS_OUTPUT_DIR == \'CACHE\'``,
the depth is 1, and the prefix will be \'../../\'.
If ``settings.COMPRESS_OUTPUT_DIR == \'my/compiled/data\'``,
the depth is 3, and the prefix will be \'../../../../\'.
Example:
- original file URL: \'/static/my-app/style.css\'
- it has an image link: ``url(images/logo.svg)``
- compiled file URL: \'/static/CACHE/css/abcdef123456.css\'
- replaced image link URL: ``url(../../my-app/images/logo.svg)``'

def post_process_url(self, url):

    old_prefix = self.url
    if self.has_scheme:
        old_prefix = '{}{}'.format(self.protocol, old_prefix)
    new_prefix = '..'
    new_prefix += ('/..' * len(list(filter(None, os.path.normpath(settings.COMPRESS_OUTPUT_DIR).split(os.sep)))))
    return re.sub('^{}'.format(old_prefix), new_prefix, url)
