'Returns url of the asset, themed url will be returned if the asset is themed otherwise default
asset url will be returned.
Args:
name: name of the asset, e.g. \'images/logo.png\'
Returns:
url of the asset, e.g. \'/static/red-theme/images/logo.png\' if current theme is red-theme and logo
is provided by red-theme otherwise \'/static/images/logo.png\''

def url(self, name):

    prefix = ''
    theme = get_current_theme()
    if theme:
        prefix = theme.theme_dir_name
    elif self.prefix:
        prefix = self.prefix
    if (prefix and self.themed(name, prefix)):
        name = os.path.join(prefix, name)
    return super(ThemeStorage, self).url(name)
