def get_restful_apps():
    apps = []
    for moddir, mod, appname in get_installed_apps():
        try:
            restfulmodule = import_module('{0}.{1}'.format(mod.__name__, 'restful'))
        except ImportError, e:
            pass
        else:
            apps.append((moddir, restfulmodule, appname))
def find_javascriptfiles():
    jsfiles = []
    extjssources = abspath(join(get_staticdir_from_appname('extjshelpers'), 'extjs'))
    jasminesources = abspath(join(get_staticdir_from_appname('jsapp'), 'jasmine'))
    for appdir, module, appname in get_installed_apps():
        for root, dirs, files in walk(join(appdir, 'static')):
            if extjssources in abspath(root): # Skip extjs
                continue
            if jasminesources in abspath(root): # Skip jasmine sources
                continue
            if 'jasminespecs' in root: # Skip jasmine tests
                continue
            for filename in files:
                if filename in ('all-classes.js', 'app-all.js'): # Skip compiled apps
                    continue
                if filename.endswith('.js'):
                    filepath = join(root, filename)
                    jsfiles.append(filepath)
    return jsfiles