@core_helper
def urls_for_resource(resource):
 r = getattr(fanstatic_resources, resource)
 resources = list(r.resources)
 core = fanstatic_resources.fanstatic_extensions.core
 f = core.get_needed()
 lib = r.library
 root_path = f.library_url(lib)
 resources = core.sort_resources(resources)
 if f._bundle:
  resources = core.bundle_resources(resources)
 out = []
 for resource in resources:
  if isinstance(resource, core.Bundle):
   paths = [resource.relpath for resource in resource.resources()]
   relpath = ';'.join(paths)
   relpath = (core.BUNDLE_PREFIX + relpath)
  else:
   relpath = resource.relpath
  out.append(('%s/%s' % (root_path, relpath)))
 return out

@ core_helper def urls_for_resource ( resource ) : r = getattr ( fanstatic_resources , resource ) resources = list ( r . resources ) core = fanstatic_resources . fanstatic_extensions . core f = core . get_needed ( ) lib = r . library root_path = f . library_url ( lib ) resources = core . sort_resources ( resources ) if f . _bundle : resources = core . bundle_resources ( resources ) out = [ ] for resource in resources : if isinstance ( resource , core . Bundle ) : paths = [ resource . relpath for resource in resource . resources ( ) ] relpath = ';' . join ( paths ) relpath = ( core . BUNDLE_PREFIX + relpath ) else : relpath = resource . relpath out . append ( ( '%s/%s' % ( root_path , relpath ) ) ) return out
returns a list of urls for the resource specified .