@frappe.whitelist()
def get_desk_assets(build_version):
 data = get_context({u'for_mobile': True})
 assets = [{u'type': u'js', u'data': u''}, {u'type': u'css', u'data': u''}]
 if (build_version != data[u'build_version']):
  for path in data[u'include_js']:
   with open(os.path.join(frappe.local.sites_path, path), u'r') as f:
    assets[0][u'data'] = ((assets[0][u'data'] + u'\n') + unicode(f.read(), u'utf-8'))
  for path in data[u'include_css']:
   with open(os.path.join(frappe.local.sites_path, path), u'r') as f:
    assets[1][u'data'] = ((assets[1][u'data'] + u'\n') + unicode(f.read(), u'utf-8'))
 return {u'build_version': data[u'build_version'], u'boot': data[u'boot'], u'assets': assets}

@ frappe . whitelist ( ) def get_desk_assets ( build_version ) : data = get_context ( { u'for_mobile' : True } ) assets = [ { u'type' : u'js' , u'data' : u'' } , { u'type' : u'css' , u'data' : u'' } ] if ( build_version != data [ u'build_version' ] ) : for path in data [ u'include_js' ] : with open ( os . path . join ( frappe . local . sites_path , path ) , u'r' ) as f : assets [ 0 ] [ u'data' ] = ( ( assets [ 0 ] [ u'data' ] + u'\n' ) + unicode ( f . read ( ) , u'utf-8' ) ) for path in data [ u'include_css' ] : with open ( os . path . join ( frappe . local . sites_path , path ) , u'r' ) as f : assets [ 1 ] [ u'data' ] = ( ( assets [ 1 ] [ u'data' ] + u'\n' ) + unicode ( f . read ( ) , u'utf-8' ) ) return { u'build_version' : data [ u'build_version' ] , u'boot' : data [ u'boot' ] , u'assets' : assets }
get desk assets to be loaded for mobile app .