def copy_js(): """ Render copy.js to file. """ from app import _copy_js response = _copy_js() js = response[0] with open('www/js/copy.js', 'w') as f: f.write(js)