'Takes full path to a static file (eg. "/static/css/style.css") and
returns path with storage\'s base url removed (eg. "css/style.css").'

def get_basename(self, url):

    try:
        base_url = self.storage.base_url
    except AttributeError:
        base_url = settings.COMPRESS_URL
    if (not url.startswith(base_url)):
        raise UncompressableFileError((u"'%s'    isn't    accessible    via    COMPRESS_URL    ('%s')    and    can't    be    compressed" % (url, base_url)))
    basename = url.replace(base_url, u'', 1)
    return basename.split(u'?', 1)[0]
